Package adams.flow.processor
Class ListClassUsage
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,ShallowCopySupporter<ActorProcessor>
,SizeOfHandler
,ActorProcessor
,ActorProcessorWithFlowPanelContext
,GraphicalOutputProducingProcessor
,ListingProcessor
,Serializable
,Comparable<ActorProcessor>
public class ListClassUsage extends AbstractActorListingProcessor
Looks for all the occurrences of the specified class.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING min-user-mode: Expert
-find <adams.core.base.BaseClassname> (property: find) The class to look for. default: adams.flow.condition.bool.BooleanCondition
-allow-derived-classes <boolean> (property: allowDerivedClasses) Whether to include derived classes as well or only exact class matches. default: false
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Class
m_Actual
the actual class to look for.protected boolean
m_AllowDerivedClasses
whether to allow derived classes.protected BaseClassname
m_Find
the class to look for.-
Fields inherited from class adams.flow.processor.AbstractActorListingProcessor
m_Context, m_Current
-
Fields inherited from class adams.flow.processor.AbstractListingProcessor
m_List
-
Fields inherited from class adams.flow.processor.AbstractActorProcessor
m_Errors
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description ListClassUsage()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
allowDerivedClassesTipText()
Returns the tip text for this property.void
defineOptions()
Adds options to the internal list of options.String
findTipText()
Returns the tip text for this property.boolean
getAllowDerivedClasses()
Returns whether derived classes can be listed as well.BaseClassname
getFind()
Returns the class to look for.protected String
getHeader()
Returns the header to use in the dialog, i.e., the one-liner that explains the output.String
getTitle()
Returns the title for the dialog.String
globalInfo()
Returns a string describing the object.protected boolean
isValid(AbstractOption option, Object obj, OptionTraversalPath path)
Checks whether the object is valid and should be added to the list.void
setAllowDerivedClasses(boolean value)
Sets whether derived classes can be listed as well.void
setFind(BaseClassname value)
Sets the class to look for.-
Methods inherited from class adams.flow.processor.AbstractActorListingProcessor
createLocation, findEnclosingActor, findEnclosingActor, getContext, getGraphicalOutput, isSortedList, isUniqueList, objectToString, processActor, setContext
-
Methods inherited from class adams.flow.processor.AbstractListingProcessor
finalizeList, generatesMultipleItems, getDefaultSize, getList, hasGraphicalOutput, initializeList, objectToStrings, process
-
Methods inherited from class adams.flow.processor.AbstractActorProcessor
addError, addError, checkData, compareTo, equals, getErrors, hasErrors, initialize, process, reset, shallowCopy, shallowCopy
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.flow.processor.ActorProcessor
compareTo, getErrors, hasErrors, process, shallowCopy, shallowCopy
-
Methods inherited from interface adams.core.Destroyable
destroy
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager, toCommandLine
-
-
-
-
Field Detail
-
m_Find
protected BaseClassname m_Find
the class to look for.
-
m_Actual
protected transient Class m_Actual
the actual class to look for.
-
m_AllowDerivedClasses
protected boolean m_AllowDerivedClasses
whether to allow derived classes.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractOptionHandler
-
setFind
public void setFind(BaseClassname value)
Sets the class to look for.- Parameters:
value
- the class
-
getFind
public BaseClassname getFind()
Returns the class to look for.- Returns:
- the class
-
findTipText
public String findTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setAllowDerivedClasses
public void setAllowDerivedClasses(boolean value)
Sets whether derived classes can be listed as well.- Parameters:
value
- true if allowed
-
getAllowDerivedClasses
public boolean getAllowDerivedClasses()
Returns whether derived classes can be listed as well.- Returns:
- true if allowed
-
allowDerivedClassesTipText
public String allowDerivedClassesTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
isValid
protected boolean isValid(AbstractOption option, Object obj, OptionTraversalPath path)
Checks whether the object is valid and should be added to the list.- Specified by:
isValid
in classAbstractListingProcessor
- Parameters:
option
- the current optionobj
- the object to checkpath
- the traversal path of properties- Returns:
- true if valid
-
getHeader
protected String getHeader()
Returns the header to use in the dialog, i.e., the one-liner that explains the output.- Specified by:
getHeader
in classAbstractListingProcessor
- Returns:
- the header, null if no header available
-
getTitle
public String getTitle()
Returns the title for the dialog.- Returns:
- the title
-
-