public interface IArgParserManager
IArgParser
instances from the registry, by their target class.
It can be assumed that a IArgParser
exists for Integer
, Long
,
Float
, Double
and Boolean
.Modifier and Type | Method and Description |
---|---|
<T,S> IArgParser.Stated<T,S> |
getParserStated(java.lang.Class<T> type,
java.lang.Class<S> stateKlass) |
<T> IArgParser.Stateless<T> |
getParserStateless(java.lang.Class<T> type) |
Registry<IArgParser> |
getRegistry() |
<T,S> T |
parseStated(java.lang.Class<T> type,
java.lang.Class<S> stateKlass,
ICommandArgument arg,
S state)
Attempt to parse the specified argument with a stated
IArgParser that outputs the specified class. |
<T> T |
parseStateless(java.lang.Class<T> type,
ICommandArgument arg)
Attempt to parse the specified argument with a stateless
IArgParser that outputs the specified class. |
<T> IArgParser.Stateless<T> getParserStateless(java.lang.Class<T> type)
type
- The type trying to be parsed<T,S> IArgParser.Stated<T,S> getParserStated(java.lang.Class<T> type, java.lang.Class<S> stateKlass)
type
- The type trying to be parsed<T> T parseStateless(java.lang.Class<T> type, ICommandArgument arg) throws CommandInvalidTypeException
IArgParser
that outputs the specified class.type
- The type to try and parse the argument into.arg
- The argument to parse.CommandInvalidTypeException
- If the parsing failed<T,S> T parseStated(java.lang.Class<T> type, java.lang.Class<S> stateKlass, ICommandArgument arg, S state) throws CommandInvalidTypeException
IArgParser
that outputs the specified class.type
- The type to try and parse the argument into.arg
- The argument to parse.state
- The state to pass to the IArgParser.Stated
.CommandInvalidTypeException
- If the parsing failedIArgParser.Stated
Registry<IArgParser> getRegistry()