org.refcodes.console.ArgsParser
, org.refcodes.console.ArgsParserMixin<org.refcodes.console.ArgsParser>
, org.refcodes.configuration.ext.console.ArgsParserProperties
, org.refcodes.structure.CanonicalMap
, org.refcodes.structure.Containable
, org.refcodes.mixin.DelimiterAccessor
, org.refcodes.mixin.DescriptionAccessor.DescriptionBuilder<org.refcodes.console.ArgsParser>
, org.refcodes.mixin.DescriptionAccessor.DescriptionMutator
, org.refcodes.structure.Dictionary<String,String>
, org.refcodes.mixin.Dumpable
, org.refcodes.structure.Keys<String,String>
, org.refcodes.mixin.NameAccessor.NameBuilder<org.refcodes.console.ArgsParser>
, org.refcodes.mixin.NameAccessor.NameMutator
, org.refcodes.structure.PathMap<String>
, org.refcodes.configuration.Properties
, org.refcodes.structure.PropertiesAccessorMixin
, org.refcodes.component.Resetable
, org.refcodes.configuration.ResourceProperties
, org.refcodes.configuration.ResourcePropertiesMixin<RuntimeProperties>
, org.refcodes.console.RootConditionAccessor
, org.refcodes.console.RootConditionAccessor.RootConditionBuilder<RuntimeProperties>
, org.refcodes.console.RootConditionAccessor.RootConditionMutator
, org.refcodes.mixin.SecretAccessor.SecretBuilder<RuntimeProperties>
, org.refcodes.mixin.SecretAccessor.SecretMutator
, org.refcodes.mixin.TitleAccessor.TitleBuilder<org.refcodes.console.ArgsParser>
, org.refcodes.mixin.TitleAccessor.TitleMutator
, org.refcodes.mixin.TypeAccessor<String>
RuntimePropertiesImpl
public interface RuntimeProperties extends org.refcodes.console.RootConditionAccessor.RootConditionMutator, org.refcodes.console.RootConditionAccessor.RootConditionBuilder<RuntimeProperties>, org.refcodes.mixin.SecretAccessor.SecretMutator, org.refcodes.mixin.SecretAccessor.SecretBuilder<RuntimeProperties>, org.refcodes.configuration.ext.console.ArgsParserProperties, org.refcodes.configuration.ResourceProperties, org.refcodes.configuration.ResourcePropertiesMixin<RuntimeProperties>
RuntimeProperties
are composed of various Properties
flavors
such as ArgsParserProperties
, SystemProperties
,
EnvironmentProperties
and ResourceProperties
with a
precedence in this order, encapsulated by a
ProfilePropertiesProjection
in order for you, the developer, to
conveniently harness the power of the Properties
functionality. You
may also add a Properties
instance programmatically to manually
provide properties (via withProperties(Properties)
). The later you
add Properties
, the lower their precedence.
After construction the use withFile(java.io.File)
,
withUrl(java.net.URL)
or the like to load the properties from
external resources. After construction use withParseArgs(String[])
or the like to parse the command line arguments (implementations might
provide a constructor such as
RuntimePropertiesImpl(String[])
for the command
line arguments if you do not require a command syntax notation).
RuntimeProperties
represent a composition of the different
Properties
flavors, therefore providing functionality from the
ArgsParserProperties
as well as from the ResourceProperties
types.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.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.configuration.ResourceProperties.MutableResoureProperties, org.refcodes.configuration.ResourceProperties.ResourcePropertiesBuilder
org.refcodes.console.RootConditionAccessor.RootConditionBuilder<B extends org.refcodes.console.RootConditionAccessor.RootConditionBuilder<B>>, org.refcodes.console.RootConditionAccessor.RootConditionMutator, org.refcodes.console.RootConditionAccessor.RootConditionProperty
Modifier and Type | Field | Description |
---|---|---|
static char[] |
DELIMITERS |
Modifier and Type | Method | Description |
---|---|---|
void |
setObfuscationMode(org.refcodes.runtime.SystemContext aObfuscationMode) |
Specifies the obfuscation mode to be used.
|
default RuntimeProperties |
withBannerFont(org.refcodes.textual.Font aBannerFont) |
|
default RuntimeProperties |
withBannerFontPalette(char[] aColorPalette) |
|
default RuntimeProperties |
withConsoleWidth(int aConsoleWidth) |
|
default RuntimeProperties |
withCopyrightNote(String aCopyrightNote) |
|
default RuntimeProperties |
withDescription(String aDescription) |
|
default RuntimeProperties |
withErrorOut(PrintStream aErrorOut) |
|
default RuntimeProperties |
withEvalArgs(String[] aArgs) |
|
default RuntimeProperties |
withEvalArgs(String aToPath,
String[] aArgs) |
|
default RuntimeProperties |
withEvalArgs(String aToPath,
List<String> aArgs) |
|
default RuntimeProperties |
withEvalArgs(List<String> aArgs) |
|
default RuntimeProperties |
withFile(File aFile) |
|
default RuntimeProperties |
withFile(File aFile,
org.refcodes.runtime.ConfigLocator aConfigLocator) |
|
default RuntimeProperties |
withFilePath(Class<?> aResourceClass,
String aFilePath) |
|
default RuntimeProperties |
withFilePath(String aFilePath) |
|
default RuntimeProperties |
withInputStream(InputStream aInputStream) |
|
default RuntimeProperties |
withLicenseNote(String aLicenseNote) |
|
default RuntimeProperties |
withLineBreak(String aLineBreak) |
|
default RuntimeProperties |
withMaxConsoleWidth(int aMaxConsoleWidth) |
|
default RuntimeProperties |
withName(String aName) |
|
default RuntimeProperties |
withObfuscationMode(org.refcodes.runtime.SystemContext aObfuscationMode) |
Builder method for the obfuscation mode property returning the builder
for applying multiple build operations.
|
RuntimeProperties |
withParseArgs(String[] aArgs) |
|
default RuntimeProperties |
withParseArgs(List<String> aArgs) |
|
RuntimeProperties |
withProperties(org.refcodes.configuration.Properties aProperties) |
A hook for you to provide
Properties programmatically. |
default RuntimeProperties |
withRootCondition(org.refcodes.console.Condition aRootCondition) |
|
default RuntimeProperties |
withSecret(String aSecret) |
|
default RuntimeProperties |
withSeparatorChar(char aSeparatorChar) |
|
default RuntimeProperties |
withStandardOut(PrintStream aStandardOut) |
|
default RuntimeProperties |
withSyntaxNotation(org.refcodes.console.SyntaxNotation aSyntaxNotation) |
|
default RuntimeProperties |
withTitle(String aTitle) |
|
default RuntimeProperties |
withUrl(URL aUrl) |
|
default org.refcodes.console.ArgsParser |
withUsageLabel(String aUsageLabel) |
errorLn, getRootCondition, printBanner, printCopyrightNote, printDescription, printHelp, printLicenseNote, printLn, printLn, printOptions, printSeparatorLn, printUsage, setBannerFont, setBannerFontPalette, setConsoleWidth, setCopyrightNote, setErrorOut, setLicenseNote, setLineBreak, setMaxConsoleWidth, setSeparatorChar, setStandardOut, setSyntaxNotation, setUsageLabel
evalArgs, evalArgs, evalArgs, evalArgs
toInstance, toInstance, toType, toType
setDescription
directories, directories, entries, entries, fromExternalKey, getArray, getArray, getRootPath, hasParentPath, isArray, isArray, isDirectory, isEntry, isRecord, isRootPath, keySet, paths, paths, records, records, toDataStructure, toDataStructure, toExternalKey, toMap, toNormalizedPath, toNormalizedPath, toParentPath, toPath
childrenOf, containsValue, getDelimiter, getType, retrieve, retrieveFrom, retrieveTo, 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
withFile, withFile, withFilePath, withFilePath, withFilePath, withFilePath, withInputStream, withUrl
void setObfuscationMode(org.refcodes.runtime.SystemContext aObfuscationMode)
aObfuscationMode
- The SystemContext
specifies which level
of obfuscation is to be used when encountering upon obfuscated
properties: E.g. obfuscation may be bound to the host, the
"secret" used for obfuscation being the same for all applications
on the same host or obfuscation may be bound to the application,
being different for different applications on the same host.default RuntimeProperties withObfuscationMode(org.refcodes.runtime.SystemContext aObfuscationMode)
aObfuscationMode
- The obfuscation mode as of
setObfuscationMode(SystemContext)
.default RuntimeProperties withRootCondition(org.refcodes.console.Condition aRootCondition)
withRootCondition
in interface org.refcodes.console.RootConditionAccessor.RootConditionBuilder<RuntimeProperties>
default RuntimeProperties withSecret(String aSecret)
withSecret
in interface org.refcodes.mixin.SecretAccessor.SecretBuilder<RuntimeProperties>
RuntimeProperties withProperties(org.refcodes.configuration.Properties aProperties)
Properties
programmatically. The later
you add Properties
, the lower their precedence.aProperties
- The Properties
to be added.RuntimeProperties withParseArgs(String[] aArgs) throws org.refcodes.console.UnknownArgsException, org.refcodes.console.AmbiguousArgsException, org.refcodes.console.SuperfluousArgsException, org.refcodes.console.ParseArgsException
withParseArgs
in interface org.refcodes.console.ArgsParser
withParseArgs
in interface org.refcodes.console.ArgsParserMixin<org.refcodes.console.ArgsParser>
org.refcodes.console.UnknownArgsException
org.refcodes.console.AmbiguousArgsException
org.refcodes.console.SuperfluousArgsException
org.refcodes.console.ParseArgsException
default RuntimeProperties withFile(File aFile) throws IOException, ParseException
withFile
in interface org.refcodes.configuration.ResourcePropertiesMixin<RuntimeProperties>
IOException
ParseException
default RuntimeProperties withFilePath(String aFilePath) throws IOException, ParseException
withFilePath
in interface org.refcodes.configuration.ResourcePropertiesMixin<RuntimeProperties>
IOException
ParseException
default RuntimeProperties withFilePath(Class<?> aResourceClass, String aFilePath) throws IOException, ParseException
withFilePath
in interface org.refcodes.configuration.ResourcePropertiesMixin<RuntimeProperties>
IOException
ParseException
default RuntimeProperties withUrl(URL aUrl) throws IOException, ParseException
withUrl
in interface org.refcodes.configuration.ResourcePropertiesMixin<RuntimeProperties>
IOException
ParseException
default RuntimeProperties withFile(File aFile, org.refcodes.runtime.ConfigLocator aConfigLocator) throws IOException, ParseException
withFile
in interface org.refcodes.configuration.ResourcePropertiesMixin<RuntimeProperties>
IOException
ParseException
default RuntimeProperties withInputStream(InputStream aInputStream) throws IOException, ParseException
withInputStream
in interface org.refcodes.configuration.ResourcePropertiesMixin<RuntimeProperties>
IOException
ParseException
default RuntimeProperties withParseArgs(List<String> aArgs) throws org.refcodes.console.UnknownArgsException, org.refcodes.console.AmbiguousArgsException, org.refcodes.console.SuperfluousArgsException, org.refcodes.console.ParseArgsException
withParseArgs
in interface org.refcodes.console.ArgsParserMixin<org.refcodes.console.ArgsParser>
org.refcodes.console.UnknownArgsException
org.refcodes.console.AmbiguousArgsException
org.refcodes.console.SuperfluousArgsException
org.refcodes.console.ParseArgsException
default RuntimeProperties withTitle(String aTitle)
withTitle
in interface org.refcodes.console.ArgsParser
withTitle
in interface org.refcodes.mixin.TitleAccessor.TitleBuilder<org.refcodes.console.ArgsParser>
default org.refcodes.console.ArgsParser withUsageLabel(String aUsageLabel)
withUsageLabel
in interface org.refcodes.console.ArgsParser
default RuntimeProperties withBannerFont(org.refcodes.textual.Font aBannerFont)
withBannerFont
in interface org.refcodes.console.ArgsParser
default RuntimeProperties withBannerFontPalette(char[] aColorPalette)
withBannerFontPalette
in interface org.refcodes.console.ArgsParser
default RuntimeProperties withConsoleWidth(int aConsoleWidth)
withConsoleWidth
in interface org.refcodes.console.ArgsParser
default RuntimeProperties withCopyrightNote(String aCopyrightNote)
withCopyrightNote
in interface org.refcodes.console.ArgsParser
default RuntimeProperties withDescription(String aDescription)
withDescription
in interface org.refcodes.console.ArgsParser
withDescription
in interface org.refcodes.mixin.DescriptionAccessor.DescriptionBuilder<org.refcodes.console.ArgsParser>
default RuntimeProperties withErrorOut(PrintStream aErrorOut)
withErrorOut
in interface org.refcodes.console.ArgsParser
default RuntimeProperties withEvalArgs(List<String> aArgs) throws org.refcodes.console.UnknownArgsException, org.refcodes.console.AmbiguousArgsException, org.refcodes.console.SuperfluousArgsException, org.refcodes.console.ParseArgsException
withEvalArgs
in interface org.refcodes.console.ArgsParser
withEvalArgs
in interface org.refcodes.configuration.ext.console.ArgsParserProperties
org.refcodes.console.UnknownArgsException
org.refcodes.console.AmbiguousArgsException
org.refcodes.console.SuperfluousArgsException
org.refcodes.console.ParseArgsException
default RuntimeProperties withEvalArgs(String aToPath, List<String> aArgs) throws org.refcodes.console.UnknownArgsException, org.refcodes.console.AmbiguousArgsException, org.refcodes.console.SuperfluousArgsException, org.refcodes.console.ParseArgsException
withEvalArgs
in interface org.refcodes.configuration.ext.console.ArgsParserProperties
org.refcodes.console.UnknownArgsException
org.refcodes.console.AmbiguousArgsException
org.refcodes.console.SuperfluousArgsException
org.refcodes.console.ParseArgsException
default RuntimeProperties withEvalArgs(String aToPath, String[] aArgs) throws org.refcodes.console.UnknownArgsException, org.refcodes.console.AmbiguousArgsException, org.refcodes.console.SuperfluousArgsException, org.refcodes.console.ParseArgsException
withEvalArgs
in interface org.refcodes.configuration.ext.console.ArgsParserProperties
org.refcodes.console.UnknownArgsException
org.refcodes.console.AmbiguousArgsException
org.refcodes.console.SuperfluousArgsException
org.refcodes.console.ParseArgsException
default RuntimeProperties withEvalArgs(String[] aArgs) throws org.refcodes.console.UnknownArgsException, org.refcodes.console.AmbiguousArgsException, org.refcodes.console.SuperfluousArgsException, org.refcodes.console.ParseArgsException
withEvalArgs
in interface org.refcodes.console.ArgsParser
withEvalArgs
in interface org.refcodes.configuration.ext.console.ArgsParserProperties
org.refcodes.console.UnknownArgsException
org.refcodes.console.AmbiguousArgsException
org.refcodes.console.SuperfluousArgsException
org.refcodes.console.ParseArgsException
default RuntimeProperties withLicenseNote(String aLicenseNote)
withLicenseNote
in interface org.refcodes.console.ArgsParser
default RuntimeProperties withLineBreak(String aLineBreak)
withLineBreak
in interface org.refcodes.console.ArgsParser
default RuntimeProperties withMaxConsoleWidth(int aMaxConsoleWidth)
withMaxConsoleWidth
in interface org.refcodes.console.ArgsParser
default RuntimeProperties withName(String aName)
withName
in interface org.refcodes.console.ArgsParser
withName
in interface org.refcodes.mixin.NameAccessor.NameBuilder<org.refcodes.console.ArgsParser>
default RuntimeProperties withSeparatorChar(char aSeparatorChar)
withSeparatorChar
in interface org.refcodes.console.ArgsParser
default RuntimeProperties withStandardOut(PrintStream aStandardOut)
withStandardOut
in interface org.refcodes.console.ArgsParser
default RuntimeProperties withSyntaxNotation(org.refcodes.console.SyntaxNotation aSyntaxNotation)
withSyntaxNotation
in interface org.refcodes.console.ArgsParser
Copyright © 2018. All rights reserved.