org.schmant.arg
Class InterpretAsNewWritableFileStrategy
java.lang.Object
org.schmant.arg.AbstractArgumentInterpretationStrategy<T>
org.schmant.arg.AbstractOneToOneArgumentInterpretationStrategy<WritableFile>
org.schmant.arg.InterpretAsNewWritableFileStrategy
- All Implemented Interfaces:
- ArgumentInterpretationStrategy<WritableFile>
public class InterpretAsNewWritableFileStrategy
- extends AbstractOneToOneArgumentInterpretationStrategy<WritableFile>
This strategy is used to interpret objects into WritableFile
:s. The
target files are created when the argument is interpreted. The object's
OverwriteStrategy
decides if existing files may be overwritten.
The interpretation is documented in the
|ai:ai_new_writable_file:User's Guide|.
- Since:
- 1.0
- Author:
- Karl Gustafsson
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InterpretAsNewWritableFileStrategy
public InterpretAsNewWritableFileStrategy(OverwriteStrategy os,
int... configuration)
getTargetType
protected Class<WritableFile> getTargetType()
- Description copied from class:
AbstractArgumentInterpretationStrategy
- Subclasses implement this to return the type that they interpret objects
as.
- Specified by:
getTargetType
in class AbstractArgumentInterpretationStrategy<WritableFile>
- Returns:
- The target type of the interpretation.
interpretObject
protected WritableFile 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<WritableFile>
- 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.