net.sf.clirr.core.internal
Class AbstractDiffReporter

java.lang.Object
  extended by net.sf.clirr.core.internal.AbstractDiffReporter
Direct Known Subclasses:
ClassHierarchyCheck, ClassModifierCheck, ClassScopeCheck, FieldSetCheck, GenderChangeCheck, InterfaceSetCheck, MethodSetCheck

public abstract class AbstractDiffReporter
extends java.lang.Object


Constructor Summary
AbstractDiffReporter(ApiDiffDispatcher dispatcher)
           
 
Method Summary
protected  ApiDiffDispatcher getApiDiffDispatcher()
           
protected  Severity getSeverity(JavaType clazz, Field field, Severity sev)
          Determine whether the severity of the problem should be reduced to INFO because: the specified field is package or private accessibility, or the specified field is in a package or private class.
protected  Severity getSeverity(JavaType clazz, Method method, Severity sev)
          Determine whether the severity of the problem should be reduced to INFO because: the specified method is package or private accessibility, or the specified method is in a package or private class.
protected  Severity getSeverity(JavaType clazz, Severity sev)
          Determine whether the severity of the problem should be reduced to INFO because the specified class is package or private accessibility.
protected  void log(Message msg, Severity severity, java.lang.String clazz, Method method, Field field, java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractDiffReporter

public AbstractDiffReporter(ApiDiffDispatcher dispatcher)
Method Detail

getApiDiffDispatcher

protected final ApiDiffDispatcher getApiDiffDispatcher()

log

protected final void log(Message msg,
                         Severity severity,
                         java.lang.String clazz,
                         Method method,
                         Field field,
                         java.lang.String[] args)

getSeverity

protected final Severity getSeverity(JavaType clazz,
                                     Severity sev)
Determine whether the severity of the problem should be reduced to INFO because the specified class is package or private accessibility. Clirr reports changes at level INFO for all private and package scoped objects.

Note that the class passed here should always be from the old class version, because we're checking whether existing code would have been able to access it (potential compatibility problems) or not.

Parameters:
clazz - is the class the change is being reported about.
sev - is the severity that should be reported for public/protected scoped classes.
Returns:
param sev if the class is public/protected, and Severity.INFO if the class is package or private scope.

getSeverity

protected final Severity getSeverity(JavaType clazz,
                                     Method method,
                                     Severity sev)
Determine whether the severity of the problem should be reduced to INFO because:

getSeverity

protected final Severity getSeverity(JavaType clazz,
                                     Field field,
                                     Severity sev)
Determine whether the severity of the problem should be reduced to INFO because:

Clirr reports changes at level INFO for all private and package scoped objects.

Note that the field passed here should always be from the old class version, because we're checking whether existing code would have been able to access it (potential compatibility problems) or not.

Parameters:
clazz - is the class containing the method of interest
field - is the field the change is being reported about.
sev - is the severity that should be reported for public/protected scoped field.
Returns:
param sev if the field is public/protected, and Severity.INFO if the field is package or private scope.


Copyright © 2003-2005 Lars Kühne. All Rights Reserved.