Package adams.core.option
Interface OptionTraverser
-
- All Known Subinterfaces:
OptionTraverserWithResult<T>
- All Known Implementing Classes:
AbstractOptionTraverser
,AbstractOptionTraverserWithResult
,ActorVariablesFinder
,ErrorHandlerInstanceLister
,FileLister
,VariableLister
,VariablesFinder
,VariablesInstanceLister
,XhtmlProducer.ActorOptionTraverser
public interface OptionTraverser
Interface for code that is being executed while traversing options.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
canHandle(AbstractOption option)
Returns whether the traverser is allowed to "handle" this option.boolean
canRecurse(Class cls)
Returns whether the traverser can recurse the specified class (base class from a ClassOption).boolean
canRecurse(Object obj)
Returns whether the traverser can recurse the specified object.void
handleArgumentOption(AbstractArgumentOption option, OptionTraversalPath path)
Handles the encountered argument option.void
handleBooleanOption(BooleanOption option, OptionTraversalPath path)
Handles the encountered boolean option.void
handleClassOption(ClassOption option, OptionTraversalPath path)
Handles the encountered class option.
-
-
-
Method Detail
-
handleBooleanOption
void handleBooleanOption(BooleanOption option, OptionTraversalPath path)
Handles the encountered boolean option.- Parameters:
option
- the option to handlepath
- the property path so far
-
handleClassOption
void handleClassOption(ClassOption option, OptionTraversalPath path)
Handles the encountered class option. Precedence over argument option.- Parameters:
option
- the option to handlepath
- the property path so far
-
handleArgumentOption
void handleArgumentOption(AbstractArgumentOption option, OptionTraversalPath path)
Handles the encountered argument option.- Parameters:
option
- the option to handlepath
- the property path so far
-
canHandle
boolean canHandle(AbstractOption option)
Returns whether the traverser is allowed to "handle" this option.- Parameters:
option
- the option to check whether it can be handled- Returns:
- true if handling via
handleArgumentOption(AbstractArgumentOption, OptionTraversalPath)
,handleClassOption(ClassOption, OptionTraversalPath)
orhandleBooleanOption(BooleanOption, OptionTraversalPath)
is allowed
-
canRecurse
boolean canRecurse(Class cls)
Returns whether the traverser can recurse the specified class (base class from a ClassOption).- Parameters:
cls
- the class to determine for whether recursing is possible or not- Returns:
- true if to traverse the options recursively
-
canRecurse
boolean canRecurse(Object obj)
Returns whether the traverser can recurse the specified object.- Parameters:
obj
- the Object to determine for whether recursing is possible or not- Returns:
- true if to traverse the options recursively
-
-