net.sf.clirr.core
Class Checker

java.lang.Object
  extended by net.sf.clirr.core.Checker
All Implemented Interfaces:
ApiDiffDispatcher

public final class Checker
extends java.lang.Object
implements ApiDiffDispatcher

This is the main class to be used by Clirr frontends, it implements the checking functionality of Clirr. Frontends can create an instance of this class and register themselves as DiffListeners, they are then informed whenever an API change is detected by the reportDiffs method.

Author:
lkuehne

Constructor Summary
Checker()
          Creates a new Checker.
 
Method Summary
 void addDiffListener(DiffListener listener)
           
 void fireDiff(ApiDifference diff)
          Called by checks to inform listeners that an API difference has been detected.
 ScopeSelector getScopeSelector()
           
 void reportDiffs(JavaType[] compatibilityBaseline, JavaType[] currentVersion)
          Checks two sets of classes for api changes and reports them to the DiffListeners.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Checker

public Checker()
Creates a new Checker.

Method Detail

getScopeSelector

public ScopeSelector getScopeSelector()

addDiffListener

public void addDiffListener(DiffListener listener)

fireDiff

public void fireDiff(ApiDifference diff)
Description copied from interface: ApiDiffDispatcher
Called by checks to inform listeners that an API difference has been detected.

Specified by:
fireDiff in interface ApiDiffDispatcher
Parameters:
diff - the API difference

reportDiffs

public void reportDiffs(JavaType[] compatibilityBaseline,
                        JavaType[] currentVersion)
                 throws CheckerException
Checks two sets of classes for api changes and reports them to the DiffListeners.

Parameters:
compatibilityBaseline - the classes that form the compatibility baseline to check against
currentVersion - the classes that are checked for compatibility with compatibilityBaseline
Throws:
CheckerException


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