Class AbstractInspectionHandler
- java.lang.Object
-
- adams.gui.visualization.debug.inspectionhandler.AbstractInspectionHandler
-
- Direct Known Subclasses:
DataContainer
,Dataset
,DefaultInspectionHandler
,ExternalActor
,FlowContainer
,InformativeStatistic
,InformativeStatisticSupporter
,List
,LocatedObject
,Map
,Mat5Array
,Mat5File
,Mat5Struct
,Notes
,OptionHandlerInspectionHandler
,SpreadSheet
,SpreadSheetSupporter
,VariableHandler
,Variables
,WekaEvaluation
,WekaInstances
public abstract class AbstractInspectionHandler extends Object
Ancestor for handlers that provide further insight into certain types of objects.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Field Summary
Fields Modifier and Type Field Description protected static Hashtable<Class,List<Class>>
m_Cache
the cache for object class / handler relation.protected static Class[]
m_HandlerClasses
the handlers (classes) currently available.protected static String[]
m_Handlers
the handlers (classnames) currently available.
-
Constructor Summary
Constructors Constructor Description AbstractInspectionHandler()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static List<AbstractInspectionHandler>
getHandler(Class cls)
Returns a handler for the specified class.static List<AbstractInspectionHandler>
getHandler(Object obj)
Returns a handler for the specified object.static String[]
getHandlers()
Returns a list with classnames of handlers.abstract boolean
handles(Class cls)
Checks whether the handler can handle the specified class.protected static void
initHandlers()
Initializes the handlers.abstract Hashtable<String,Object>
inspect(Object obj)
Returns further inspection values.protected static List<AbstractInspectionHandler>
instantiate(List<Class> handlers)
Instantiates the handlers.
-
-
-
Field Detail
-
m_Cache
protected static Hashtable<Class,List<Class>> m_Cache
the cache for object class / handler relation.
-
m_Handlers
protected static String[] m_Handlers
the handlers (classnames) currently available.
-
m_HandlerClasses
protected static Class[] m_HandlerClasses
the handlers (classes) currently available.
-
-
Method Detail
-
initHandlers
protected static void initHandlers()
Initializes the handlers.
-
getHandler
public static List<AbstractInspectionHandler> getHandler(Object obj)
Returns a handler for the specified object.- Parameters:
obj
- the object to get a commandline handler for- Returns:
- the handler
-
instantiate
protected static List<AbstractInspectionHandler> instantiate(List<Class> handlers)
Instantiates the handlers.- Parameters:
handlers
- the handlers to instantiate- Returns:
- the instances
-
getHandler
public static List<AbstractInspectionHandler> getHandler(Class cls)
Returns a handler for the specified class.- Parameters:
cls
- the class to get a commandline handler for- Returns:
- the handler
-
handles
public abstract boolean handles(Class cls)
Checks whether the handler can handle the specified class.- Parameters:
cls
- the class to check- Returns:
- true if the handler can handle this type of object
-
inspect
public abstract Hashtable<String,Object> inspect(Object obj)
Returns further inspection values.- Parameters:
obj
- the object to further inspect- Returns:
- the named inspected values
-
getHandlers
public static String[] getHandlers()
Returns a list with classnames of handlers.- Returns:
- the handler classnames
-
-