org.schmant.arg
Class InterpretAsEntityHolderStrategy
java.lang.Object
org.schmant.arg.AbstractArgumentInterpretationStrategy<T>
org.schmant.arg.AbstractOneToOneArgumentInterpretationStrategy<EntityHolder>
org.schmant.arg.InterpretAsEntityHolderStrategy
- All Implemented Interfaces:
- ArgumentInterpretationStrategy<EntityHolder>
public class InterpretAsEntityHolderStrategy
- extends AbstractOneToOneArgumentInterpretationStrategy<EntityHolder>
This strategy is used to interpret objects into EntityHolder
:s (a
very limited directory). It is documented in the
|ai:ai_entity_holder: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 InterpretAsEntityHolderStrategy AS_SEVERAL
- This object can be used for interpreting objects into one or several
EntityHolder
objects.
AS_SINGLE
public static final InterpretAsEntityHolderStrategy AS_SINGLE
- This object can be used for interpreting objects into one
EntityHolder
object.
InterpretAsEntityHolderStrategy
public InterpretAsEntityHolderStrategy(int... configuration)
getTargetType
protected Class<EntityHolder> getTargetType()
- Description copied from class:
AbstractArgumentInterpretationStrategy
- Subclasses implement this to return the type that they interpret objects
as.
- Specified by:
getTargetType
in class AbstractArgumentInterpretationStrategy<EntityHolder>
- Returns:
- The target type of the interpretation.
interpretObject
protected EntityHolder 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<EntityHolder>
- 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.