org.schmant.arg
Class InterpretAsDirectoryStrategy
java.lang.Object
org.schmant.arg.AbstractArgumentInterpretationStrategy<T>
org.schmant.arg.AbstractOneToOneArgumentInterpretationStrategy<DirectoryRepresentation>
org.schmant.arg.InterpretAsDirectoryStrategy
- All Implemented Interfaces:
- ArgumentInterpretationStrategy<DirectoryRepresentation>
public class InterpretAsDirectoryStrategy
- extends AbstractOneToOneArgumentInterpretationStrategy<DirectoryRepresentation>
This strategy is used to interpret objects into read/write
DirectoryView
:s. It is documented in the
|ai:ai_directory:User's Guide|.
For most cases, the constants AS_SINGLE
and AS_SEVERAL
can
be used instead of creating a new object.
- Since:
- 1.0
- Author:
- Karl Gustafsson
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AS_SEVERAL
public static final InterpretAsDirectoryStrategy AS_SEVERAL
- This constant can be used to evaluate objects into a list of read/write
DirectoryRepresentation
objects.
AS_SINGLE
public static final InterpretAsDirectoryStrategy AS_SINGLE
- This constant can be used to evaluate objects into a single read/write
DirectoryRepresentation
object.
InterpretAsDirectoryStrategy
public InterpretAsDirectoryStrategy(int... configuration)
getTargetType
protected Class<DirectoryRepresentation> getTargetType()
- Description copied from class:
AbstractArgumentInterpretationStrategy
- Subclasses implement this to return the type that they interpret objects
as.
- Specified by:
getTargetType
in class AbstractArgumentInterpretationStrategy<DirectoryRepresentation>
- Returns:
- The target type of the interpretation.
interpretObject
protected DirectoryRepresentation interpretObject(Object o,
List<String> t)
- Description copied from class:
AbstractOneToOneArgumentInterpretationStrategy
- Subclasses implement this to interpret the supplied object.
- Specified by:
interpretObject
in class AbstractOneToOneArgumentInterpretationStrategy<DirectoryRepresentation>
- Parameters:
o
- The object to interpret.t
- The interpretation trace list. The list should be
populated by this method.
- Returns:
- The interpreted object or
null
if it could not be
interpreted.