public class CliClassContainer extends Object
CliClassContainer determines and holds the class-specific CLI-informations of a state-class.| Modifier and Type | Class and Description |
|---|---|
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. |
| Modifier and Type | Field and Description |
|---|---|
private CliClass |
cliClass |
private CliStyle |
cliStyle |
private Map<String,CliModeContainer> |
id2ModeMap |
private org.slf4j.Logger |
logger |
private String |
name |
private Class<?> |
stateClass |
| Constructor and Description |
|---|
CliClassContainer(Class<?> stateClass,
org.slf4j.Logger logger)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
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)
|
Collection<String> |
getModeIds()
|
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. |
private final Class<?> stateClass
private final CliStyle cliStyle
private final CliClass cliClass
private final Map<String,CliModeContainer> id2ModeMap
private final String name
private final org.slf4j.Logger logger
public CliClassContainer(Class<?> stateClass, org.slf4j.Logger logger)
stateClass - is the state-class.logger - is the Logger to use (e.g. for CliStyleHandling).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.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)
public Collection<String> getModeIds()
public String getName()
name configured for the state-class .name or the class-name of the
state-class if NOT configured.Copyright © 2001–2016 mmm-Team. All rights reserved.