public abstract class AbstractCliParserBuilder extends AbstractLoggableComponent implements CliParserBuilder, CliParserDependencies
CliParserBuilder
interface.Modifier and Type | Field and Description |
---|---|
private AnnotationUtil |
annotationUtil |
private CollectionFactoryManager |
collectionFactoryManager |
private CollectionReflectionUtil |
collectionReflectionUtil |
private ComposedValueConverter |
converter |
private PojoDescriptorBuilder |
descriptorBuilder |
private PojoDescriptorBuilderFactory |
descriptorBuilderFactory |
private LineWrapper |
lineWrapper |
private NlsMessageFactory |
nlsMessageFactory |
private NlsTemplateResolver |
nlsTemplateResolver |
private ReflectionUtil |
reflectionUtil |
private StringUtil |
stringUtil |
Constructor and Description |
---|
AbstractCliParserBuilder()
The constructor.
|
createLogger, getLogger
doInitialized, getInitializationState, initialize
private PojoDescriptorBuilderFactory descriptorBuilderFactory
private PojoDescriptorBuilder descriptorBuilder
private NlsMessageFactory nlsMessageFactory
private NlsTemplateResolver nlsTemplateResolver
private StringUtil stringUtil
private AnnotationUtil annotationUtil
private ReflectionUtil reflectionUtil
private CollectionReflectionUtil collectionReflectionUtil
private CollectionFactoryManager collectionFactoryManager
private ComposedValueConverter converter
private LineWrapper lineWrapper
protected void doInitialize()
AbstractComponent
initialization
. It is called when AbstractComponent.initialize()
is
invoked for the first time. super.
AbstractComponent.doInitialize()
.doInitialize
in class AbstractLoggableComponent
public CliParser build(Object pojo)
CliParserBuilder
CliParser
instance from the given Pojo
. The
following applies for the class reflecting this pojo:
CliOption
and / or
CliArgument
.CliClass
.main-program
itself, but it
can be any Pojo
.build
in interface CliParserBuilder
pojo
- is the annotated object for the CLI-state.CliParser
used to parse
the
commandline-arguments and potentially print the help
.protected abstract CliParser buildInternal(Object state, CliState cliState)
build(Object)
internally.state
- is the state object
.cliState
- is the according CliState
.CliParser
.protected PojoDescriptorBuilderFactory getDescriptorBuilderFactory()
@Inject public void setDescriptorBuilderFactory(PojoDescriptorBuilderFactory descriptorBuilderFactory)
descriptorBuilderFactory
- is the descriptorBuilderFactory to setprotected PojoDescriptorBuilder getDescriptorBuilder()
public void setDescriptorBuilder(PojoDescriptorBuilder descriptorBuilder)
descriptorBuilder
- is the descriptorBuilder to setpublic CollectionFactoryManager getCollectionFactoryManager()
getCollectionFactoryManager
in interface CliParserDependencies
CollectionFactoryManager
instance to use.@Inject public void setCollectionFactoryManager(CollectionFactoryManager collectionFactoryManager)
collectionFactoryManager
- is the collectionFactoryManager to setpublic StringUtil getStringUtil()
getStringUtil
in interface CliParserDependencies
StringUtil
instance to use.@Inject public void setStringUtil(StringUtil stringUtil)
stringUtil
- is the stringUtil to setpublic AnnotationUtil getAnnotationUtil()
getAnnotationUtil
in interface CliParserDependencies
AnnotationUtil
instance to use.@Inject public void setAnnotationUtil(AnnotationUtil annotationUtil)
annotationUtil
- is the annotationUtil to setpublic CollectionReflectionUtil getCollectionReflectionUtil()
getCollectionReflectionUtil
in interface CliParserDependencies
CollectionReflectionUtil
instance to use.@Inject public void setCollectionReflectionUtil(CollectionReflectionUtil collectionReflectionUtil)
collectionReflectionUtil
- is the collectionReflectionUtil to setpublic ReflectionUtil getReflectionUtil()
getReflectionUtil
in interface CliParserDependencies
ReflectionUtil
instance to use.@Inject public void setReflectionUtil(ReflectionUtil reflectionUtil)
reflectionUtil
- is the reflectionUtil to setpublic NlsMessageFactory getNlsMessageFactory()
getNlsMessageFactory
in interface CliParserDependencies
NlsMessageFactory
instance to use.@Inject public void setNlsMessageFactory(NlsMessageFactory nlsMessageFactory)
nlsMessageFactory
- is the nlsMessageFactory to setpublic NlsTemplateResolver getNlsTemplateResolver()
getNlsTemplateResolver
in interface CliParserDependencies
NlsTemplateResolver
instance to use or null
to use the default instance.public void setNlsTemplateResolver(NlsTemplateResolver nlsTemplateResolver)
nlsTemplateResolver
- is the NlsTemplateResolver
to use.public ComposedValueConverter getConverter()
getConverter
in interface CliParserDependencies
ComposedValueConverter
instance used to convert CLI parameters to typed values.@Inject public void setConverter(ComposedValueConverter converter)
converter
- is the converter to setpublic LineWrapper getLineWrapper()
getLineWrapper
in interface CliParserDependencies
LineWrapper
used for justification of texts for the help texts.@Inject public void setLineWrapper(LineWrapper lineWrapper)
lineWrapper
- is the lineWrapper to setCopyright © 2001–2016 mmm-Team. All rights reserved.