de.unihalle.informatik.Alida.helpers
Class ALDClassInfo

java.lang.Object
  extended by de.unihalle.informatik.Alida.helpers.ALDClassInfo

public class ALDClassInfo
extends java.lang.Object

Supplies helper methods to, e.g., lookup classes with annotations.

Author:
posch

Field Summary
private static boolean debug
          Debug flag for internal usage only.
 
Constructor Summary
ALDClassInfo()
           
 
Method Summary
static java.util.Collection<java.lang.Class> lookupExtendingClasses(java.lang.Class cl)
          Collects all derived class of given class.
static java.util.Collection<ALDOperatorLocation> lookupOperators(ALDAOperator.Level level, ALDAOperator.ExecutionMode executionMode)
          Collects all operators annotated with teh requested level and execution mode.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

private static boolean debug
Debug flag for internal usage only.

Constructor Detail

ALDClassInfo

public ALDClassInfo()
Method Detail

lookupExtendingClasses

public static java.util.Collection<java.lang.Class> lookupExtendingClasses(java.lang.Class cl)
Collects all derived class of given class.

The method searches for all derived classes of the given class among all classes annotated with @ALDDerivedClass that are found in the classpath. In this context derived classes are classes which either implement the specified interface or extend the given class.

Parameters:
cl - Class for which derived classes are requested.
Returns:
List of extending classes including class itself.

lookupOperators

public static java.util.Collection<ALDOperatorLocation> lookupOperators(ALDAOperator.Level level,
                                                                        ALDAOperator.ExecutionMode executionMode)
Collects all operators annotated with teh requested level and execution mode.

If level is Level.APPLICATION then only operators with this level will be return. If level is Level.STANDARD all operator levels are acepted.

Parameters:
level - Class for which derived classes are requested.
Returns:
List of operator names with requested level and execution mode