org.refcodes.component.Resetable
, ArgsParserProperties
, org.refcodes.configuration.Properties
, org.refcodes.console.ArgsParser
, org.refcodes.console.ArgsParserMixin<org.refcodes.console.ArgsParser>
, org.refcodes.console.RootConditionAccessor
, org.refcodes.mixin.DelimiterAccessor
, org.refcodes.mixin.DescriptionAccessor.DescriptionBuilder<org.refcodes.console.ArgsParser>
, org.refcodes.mixin.DescriptionAccessor.DescriptionMutator
, org.refcodes.mixin.Dumpable
, org.refcodes.mixin.NameAccessor.NameBuilder<org.refcodes.console.ArgsParser>
, org.refcodes.mixin.NameAccessor.NameMutator
, org.refcodes.mixin.TitleAccessor.TitleBuilder<org.refcodes.console.ArgsParser>
, org.refcodes.mixin.TitleAccessor.TitleMutator
, org.refcodes.mixin.TypeAccessor<String>
, org.refcodes.structure.CanonicalMap
, org.refcodes.structure.Containable
, org.refcodes.structure.Dictionary<String,String>
, org.refcodes.structure.Keys<String,String>
, org.refcodes.structure.PathMap<String>
, org.refcodes.structure.PropertiesAccessorMixin
public class ArgsParserPropertiesImpl extends org.refcodes.console.ArgsParserImpl implements ArgsParserProperties
org.refcodes.structure.CanonicalMap.CanonicalMapBuilder, org.refcodes.structure.CanonicalMap.MutableCanonicalMap
org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<B extends org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<B>>, org.refcodes.mixin.DelimiterAccessor.DelimiterMutator, org.refcodes.mixin.DelimiterAccessor.DelimiterProperty
org.refcodes.structure.Dictionary.MutableDictionary<K extends Object,V extends Object>
org.refcodes.structure.Keys.MutableKeys<K extends Object,V extends Object>, org.refcodes.structure.Keys.MutableValues<K extends Object,V extends Object>
org.refcodes.structure.PathMap.MutablePathMap<T extends Object>, org.refcodes.structure.PathMap.PathMapBuilder<T extends Object>
org.refcodes.configuration.Properties.MutableProperties, org.refcodes.configuration.Properties.PropertiesBuilder
org.refcodes.structure.PropertiesAccessorMixin.PropertiesBuilderMixin<T extends Object>, org.refcodes.structure.PropertiesAccessorMixin.PropertiesMixin, org.refcodes.structure.PropertiesAccessorMixin.PropertiesMutatorMixin
org.refcodes.console.RootConditionAccessor.RootConditionBuilder<B extends org.refcodes.console.RootConditionAccessor.RootConditionBuilder<B>>, org.refcodes.console.RootConditionAccessor.RootConditionMutator, org.refcodes.console.RootConditionAccessor.RootConditionProperty
Constructor | Description |
---|---|
ArgsParserPropertiesImpl() |
Constructs the
ArgsParserProperties instance with no syntax
notation (no root Condition ). |
ArgsParserPropertiesImpl(String[] aArgs) |
Constructs the
ArgsParserProperties instance with the given
arguments and the default SyntaxNotation.REFCODES . |
ArgsParserPropertiesImpl(String[] aArgs,
org.refcodes.console.Condition aRootCondition) |
Constructs the
ArgsParserProperties instance with the given root
Condition and the default SyntaxNotation.REFCODES . |
ArgsParserPropertiesImpl(org.refcodes.console.Condition aRootCondition) |
Constructs the
ArgsParserProperties instance with the given root
Condition and the default SyntaxNotation.REFCODES . |
Modifier and Type | Method | Description |
---|---|---|
org.refcodes.configuration.Properties |
childrenOf(String aParentPath) |
|
boolean |
containsKey(Object aKey) |
|
List<? extends org.refcodes.console.Operand<?>> |
evalArgs(String[] aArgs) |
Evaluates the command line arguments and sets the identified properties
in this
Properties instance. |
List<? extends org.refcodes.console.Operand<?>> |
evalArgs(String aToPath,
String[] aArgs) |
Same as
ArgsParserProperties.evalArgs(String[]) with the difference that the
identified properties are inserted below the provided path. |
List<? extends org.refcodes.console.Operand<?>> |
evalArgs(String aToPath,
List<String> aArgs) |
Same as
ArgsParserProperties.evalArgs(String[]) with the difference that the
identified properties are inserted below the provided path. |
List<? extends org.refcodes.console.Operand<?>> |
evalArgs(List<String> aArgs) |
Evaluates the command line arguments and sets the identified properties
in this
Properties instance. |
String |
get(Object aKey) |
|
char |
getDelimiter() |
|
boolean |
isEmpty() |
|
Set<String> |
keySet() |
|
org.refcodes.configuration.Properties |
retrieveFrom(String aFromPath) |
|
org.refcodes.configuration.Properties |
retrieveTo(String aToPath) |
|
int |
size() |
|
Object |
toDataStructure(String aPath) |
|
Collection<String> |
values() |
errorLn, getRootCondition, printBanner, printCopyrightNote, printDescription, printHelp, printLicenseNote, printLn, printLn, printOptions, printSeparatorLn, printUsage, setBannerFont, setBannerFontPalette, setConsoleWidth, setCopyrightNote, setErrorOut, setLicenseNote, setLineBreak, setMaxConsoleWidth, setSeparatorChar, setStandardOut, setSyntaxNotation, setUsageLabel, withBannerFont, withBannerFontPalette, withConsoleWidth, withCopyrightNote, withDescription, withErrorOut, withLicenseNote, withLineBreak, withMaxConsoleWidth, withName, withParseArgs, withSeparatorChar, withStandardOut, withSyntaxNotation, withTitle, withUsageLabel
errorLn, fromArgs, getRootCondition, printBanner, printCopyrightNote, printDescription, printHelp, printLicenseNote, printLn, printLn, printOptions, printSeparatorLn, printUsage, reset, setBannerFont, setBannerFontPalette, setConsoleWidth, setCopyrightNote, setDescription, setErrorOut, setLicenseNote, setLineBreak, setMaxConsoleWidth, setName, setSeparatorChar, setStandardOut, setSyntaxNotation, setTitle, setUsageLabel
withEvalArgs, withEvalArgs, withEvalArgs, withEvalArgs
toInstance, toInstance, toType, toType
setDescription
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
directories, directories, entries, entries, fromExternalKey, getArray, getArray, getRootPath, hasParentPath, isArray, isArray, isDirectory, isEntry, isRecord, isRootPath, keySet, paths, paths, records, records, toDataStructure, toExternalKey, toMap, toNormalizedPath, toNormalizedPath, toParentPath, toPath
containsValue, getType, retrieve, toMap, toProperties, toPropertyPath
containsKey, get, getBoolean, getBoolean, getByte, getByte, getCharacter, getCharacter, getDouble, getDouble, getFloat, getFloat, getInteger, getInteger, getLong, getLong, getShort, getShort, use, useBoolean, useBoolean, useByte, useByte, useDouble, useDouble, useFloat, useFloat, useInteger, useInteger, useLong, useLong, useShort, useShort
public ArgsParserPropertiesImpl()
ArgsParserProperties
instance with no syntax
notation (no root Condition
). As no syntax notation is required
by the constructor (no root Condition
), no syntax validation is
done by evalArgs(String[])
and the like methods. When no syntax
validation is fine for you, you can directly go for the constructor
ArgsParserPropertiesImpl(String[])
.public ArgsParserPropertiesImpl(org.refcodes.console.Condition aRootCondition)
ArgsParserProperties
instance with the given root
Condition
and the default SyntaxNotation.REFCODES
.aRootCondition
- The root condition being the node from which
parsing the command line arguments starts.public ArgsParserPropertiesImpl(String[] aArgs)
ArgsParserProperties
instance with the given
arguments and the default SyntaxNotation.REFCODES
. As no syntax
notation is required by the constructor (no root Condition
), no
syntax validation is done. Therefore the properties are heuristically
determined from the provided command line arguments.aArgs
- The command line arguments to be evaluated.public ArgsParserPropertiesImpl(String[] aArgs, org.refcodes.console.Condition aRootCondition) throws org.refcodes.console.UnknownArgsException, org.refcodes.console.AmbiguousArgsException, org.refcodes.console.SuperfluousArgsException, org.refcodes.console.ParseArgsException
ArgsParserProperties
instance with the given root
Condition
and the default SyntaxNotation.REFCODES
.aArgs
- The command line arguments to be evaluated.aRootCondition
- The root condition being the node from which
parsing the command line arguments starts.org.refcodes.console.UnknownArgsException
- Thrown in case not one command line argument
matched regarding the provided args vs. the expected args.org.refcodes.console.AmbiguousArgsException
- Thrown in case at least one command line
argument is ambiguous regarding expected args vs. provided args.org.refcodes.console.SuperfluousArgsException
- Thrown in case there were arguments
found not being used (superfluous arguments).org.refcodes.console.ParseArgsException
- Thrown in case the provided command line
arguments do not respect the required syntax or cannot be
converted to the required typepublic List<? extends org.refcodes.console.Operand<?>> evalArgs(String[] aArgs) throws org.refcodes.console.UnknownArgsException, org.refcodes.console.AmbiguousArgsException, org.refcodes.console.SuperfluousArgsException, org.refcodes.console.ParseArgsException
Properties
instance. Previously identified properties are
reset upon invocation of this method. When provided, then an
Operand
's alias is used as property name, else as fall back, the
operand's (when being of sub-type Option
) long-option or
short-option is used. Make sure, to provide an alias to make the
Properties
work and feel as intended!
evalArgs
in interface org.refcodes.console.ArgsParser
evalArgs
in interface ArgsParserProperties
evalArgs
in class org.refcodes.console.ArgsParserImpl
org.refcodes.console.UnknownArgsException
org.refcodes.console.AmbiguousArgsException
org.refcodes.console.SuperfluousArgsException
org.refcodes.console.ParseArgsException
public List<? extends org.refcodes.console.Operand<?>> evalArgs(List<String> aArgs) throws org.refcodes.console.UnknownArgsException, org.refcodes.console.AmbiguousArgsException, org.refcodes.console.SuperfluousArgsException, org.refcodes.console.ParseArgsException
Properties
instance. Previously identified properties are
reset upon invocation of this method. When provided, then an
Operand
's alias is used as property name, else as fall back, the
operand's (when being of sub-type Option
) long-option or
short-option is used. Make sure, to provide an alias to make the
Properties
work and feel as intended!
evalArgs
in interface org.refcodes.console.ArgsParser
evalArgs
in interface ArgsParserProperties
org.refcodes.console.UnknownArgsException
org.refcodes.console.AmbiguousArgsException
org.refcodes.console.SuperfluousArgsException
org.refcodes.console.ParseArgsException
public List<? extends org.refcodes.console.Operand<?>> evalArgs(String aToPath, List<String> aArgs) throws org.refcodes.console.UnknownArgsException, org.refcodes.console.AmbiguousArgsException, org.refcodes.console.SuperfluousArgsException, org.refcodes.console.ParseArgsException
ArgsParserProperties.evalArgs(String[])
with the difference that the
identified properties are inserted below the provided path.evalArgs
in interface ArgsParserProperties
aToPath
- The path below which to insert the identified properties.aArgs
- The command line arguments to be evaluated.Operand
interfaces or its sub-types.org.refcodes.console.UnknownArgsException
- Thrown in case not one command line argument
matched regarding the provided args vs. the expected args.org.refcodes.console.AmbiguousArgsException
- Thrown in case at least one command line
argument is ambiguous regarding expected args vs. provided args.org.refcodes.console.SuperfluousArgsException
- Thrown in case there were arguments
found not being used (superfluous arguments).org.refcodes.console.ParseArgsException
- Thrown in case the provided command line
arguments do not respect the required syntax or cannot be
converted to the required typepublic char getDelimiter()
getDelimiter
in interface org.refcodes.mixin.DelimiterAccessor
getDelimiter
in interface org.refcodes.configuration.Properties
getDelimiter
in class org.refcodes.console.ArgsParserImpl
public int size()
size
in interface org.refcodes.structure.Containable
public boolean containsKey(Object aKey)
public boolean isEmpty()
isEmpty
in interface org.refcodes.structure.Containable
public Collection<String> values()
public org.refcodes.configuration.Properties retrieveFrom(String aFromPath)
retrieveFrom
in interface org.refcodes.structure.CanonicalMap
retrieveFrom
in interface org.refcodes.structure.PathMap<String>
retrieveFrom
in interface org.refcodes.configuration.Properties
public org.refcodes.configuration.Properties retrieveTo(String aToPath)
retrieveTo
in interface org.refcodes.structure.CanonicalMap
retrieveTo
in interface org.refcodes.structure.PathMap<String>
retrieveTo
in interface org.refcodes.configuration.Properties
public org.refcodes.configuration.Properties childrenOf(String aParentPath)
childrenOf
in interface org.refcodes.structure.CanonicalMap
childrenOf
in interface org.refcodes.structure.PathMap<String>
childrenOf
in interface org.refcodes.configuration.Properties
public Object toDataStructure(String aPath)
toDataStructure
in interface org.refcodes.structure.PathMap<String>
public List<? extends org.refcodes.console.Operand<?>> evalArgs(String aToPath, String[] aArgs) throws org.refcodes.console.UnknownArgsException, org.refcodes.console.AmbiguousArgsException, org.refcodes.console.SuperfluousArgsException, org.refcodes.console.ParseArgsException
ArgsParserProperties.evalArgs(String[])
with the difference that the
identified properties are inserted below the provided path.evalArgs
in interface ArgsParserProperties
aToPath
- The path below which to insert the identified properties.aArgs
- The command line arguments to be evaluated.Operand
interfaces or its sub-types.org.refcodes.console.UnknownArgsException
- Thrown in case not one command line argument
matched regarding the provided args vs. the expected args.org.refcodes.console.AmbiguousArgsException
- Thrown in case at least one command line
argument is ambiguous regarding expected args vs. provided args.org.refcodes.console.SuperfluousArgsException
- Thrown in case there were arguments
found not being used (superfluous arguments).org.refcodes.console.ParseArgsException
- Thrown in case the provided command line
arguments do not respect the required syntax or cannot be
converted to the required typeCopyright © 2018. All rights reserved.