|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.mmm.util.cli.base.CliClassContainer
public class CliClassContainer
A CliClassContainer
determines and holds the class-specific
CLI-informations of a state-class
.
Nested Class Summary | |
---|---|
private static class |
CliClassContainer.CliDefaultAnnotations
This inner class is a dummy for getting default instances of CLI annotations. |
protected static class |
CliClassContainer.CliModeFormatter
This inner class converts a CliModeContainer to a String . |
Field Summary | |
---|---|
private CliClass |
cliClass
|
private CliStyle |
cliStyle
|
private Map<String,CliModeContainer> |
id2ModeMap
|
private org.slf4j.Logger |
logger
|
private String |
name
|
private Class<?> |
stateClass
|
Constructor Summary | |
---|---|
CliClassContainer(Class<?> stateClass,
org.slf4j.Logger logger)
The constructor. |
Method Summary | |
---|---|
private void |
addMode(CliMode mode,
Class<?> annotatedClass)
This method adds the given CliMode . |
protected void |
addMode(CliModeContainer mode)
This method adds the given CliMode . |
CliClass |
getCliClass()
This method gets the CliClass configured for the
state-class . |
CliStyle |
getCliStyle()
This method gets the style configured for the
state-class . |
org.slf4j.Logger |
getLogger()
This method gets the Logger . |
CliModeObject |
getMode(String id)
This method gets the mode associated with the
given ID . |
Collection<String> |
getModeIds()
This method gets the Collection with the IDs
of all registered CliMode s. |
String |
getName()
This method gets the name configured for the
state-class . |
Class<?> |
getStateClass()
This method gets the Class reflecting the
state-object . |
protected NodeCycle<CliModeContainer> |
initializeModeRecursive(CliModeContainer mode)
This method initializes the given CliModeContainer . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final Class<?> stateClass
getStateClass()
private final CliStyle cliStyle
getCliStyle()
private final CliClass cliClass
getCliClass()
private final Map<String,CliModeContainer> id2ModeMap
getMode(String)
private final String name
getName()
private final org.slf4j.Logger logger
getLogger()
Constructor Detail |
---|
public CliClassContainer(Class<?> stateClass, org.slf4j.Logger logger)
stateClass
- is the state-class
.logger
- is the Logger
to use (e.g. for
CliStyleHandling
).Method Detail |
---|
public org.slf4j.Logger getLogger()
Logger
.
Logger
.protected NodeCycle<CliModeContainer> initializeModeRecursive(CliModeContainer mode) throws NodeCycleException
CliModeContainer
.
mode
- is the CliModeContainer
to initialize.
NodeCycle
if a cyclic dependency has been detected but is
NOT yet complete or null
if the initialization was
successful.
NodeCycleException
- if a cyclic dependency was detected and
completed.private void addMode(CliMode mode, Class<?> annotatedClass)
CliMode
.
mode
- is the CliMode
to add.annotatedClass
- is the Class where the CliMode
was annotated.protected void addMode(CliModeContainer mode)
CliMode
.
mode
- is the CliMode
to add.public Class<?> getStateClass()
Class
reflecting the
state-object
.
public CliStyle getCliStyle()
style
configured for the
state-class
. If no such annotation is present, a
default instance is returned.
CliStyle
.public CliClass getCliClass()
CliClass
configured for the
state-class
. If no such annotation is present, a
default instance is returned.
CliClass
.public CliModeObject getMode(String id)
mode
associated with the
given ID
.
id
- the ID
of the requested CliMode
.
CliMode
or null
if no such
CliMode
exists.public Collection<String> getModeIds()
Collection
with the IDs
of all registered
CliMode
s.
public String getName()
name
configured for the
state-class
.
name
or the
class-name
of the state-class
if NOT configured.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |