public class CliModeContainer extends Object implements CliModeObject
CliMode
together with additional associated information.Modifier and Type | Field and Description |
---|---|
private Class<?> |
annotatedClass |
private Set<CliModeContainer> |
extendedModes |
private String |
id |
private CliMode |
mode |
private InitializationState |
state |
Modifier | Constructor and Description |
---|---|
|
CliModeContainer(CliMode mode,
Class<?> annotatedClass)
The constructor.
|
private |
CliModeContainer(CliMode mode,
Class<?> annotatedClass,
String id)
The constructor.
|
|
CliModeContainer(String id)
The constructor for a dummy instance.
|
Modifier and Type | Method and Description |
---|---|
Class<?> |
getAnnotatedClass()
|
Set<CliModeContainer> |
getExtendedModes()
|
String |
getId()
|
CliMode |
getMode()
This method gets the actual
CliMode . |
InitializationState |
getState() |
String |
getTitle()
|
boolean |
isAncestorOf(CliModeObject childMode)
Determines if this
CliModeObject is an ancestor of the given childMode . |
boolean |
isDescendantOf(CliModeObject parentMode)
Determines if this
CliModeObject is a descendant of the given parentMode . |
void |
setState(InitializationState state) |
String |
toString() |
private final String id
private final CliMode mode
private final Class<?> annotatedClass
private final Set<CliModeContainer> extendedModes
private InitializationState state
public CliModeContainer(String id)
id
- is the ID
.public CliModeContainer(CliMode mode, Class<?> annotatedClass)
mode
- is the mode
.annotatedClass
- is the annotated class
.public String getId()
CliModeObject
ID
of the mode
. CliModeObject.getMode()
may return null
.getId
in interface CliModeObject
public String getTitle()
CliModeObject
title
of the mode
. If the title is NOT set, the ID
is returnedCliModeObject.getMode()
may return null
.getTitle
in interface CliModeObject
ID
if title is NOT set.public CliMode getMode()
CliModeObject
CliMode
.getMode
in interface CliModeObject
CliMode
or null
if no CliMode
annotation was present.public Class<?> getAnnotatedClass()
CliModeObject
getAnnotatedClass
in interface CliModeObject
Class
or null
if CliModeObject.getMode()
is null
.public Set<CliModeContainer> getExtendedModes()
public boolean isAncestorOf(CliModeObject childMode)
CliModeObject
CliModeObject
is an ancestor of the given childMode
. So if the given
childMode
extends this CliModeObject
directly or indirect, this method will return true
.isAncestorOf
in interface CliModeObject
childMode
- is the CliModeObject
to relate to.true
this CliModeObject
is an ancestor of the given childMode
, false
otherwise.public boolean isDescendantOf(CliModeObject parentMode)
CliModeObject
CliModeObject
is a descendant of the given parentMode
. So if this
CliModeObject
extends the given childMode
directly or indirect, this method will return
true
.isDescendantOf
in interface CliModeObject
parentMode
- is the CliModeObject
to relate to.true
this CliModeObject
is a descendant of the given parentMode
, false
otherwise.public InitializationState getState()
public void setState(InitializationState state)
state
- is the state to setCopyright © 2001–2016 mmm-Team. All rights reserved.