A - Argument typeD - Declared Statement representationE - Effective Statement representationpublic abstract class AbstractStatementSupport<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>> extends Object implements StatementDefinition, StatementFactory<A,D,E>, StatementSupport<A,D,E>
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractStatementSupport(StatementDefinition publicDefinition) |
| Modifier and Type | Method and Description |
|---|---|
Optional<StatementContextBase<?,?,?>> |
beforeSubStatementCreated(StmtContext.Mutable<?,?,?> stmt,
int offset,
StatementDefinitionContext<?,?,?> def,
StatementSourceReference ref,
String argument)
Invoked before a substatement with specified offset, definition,
reference and argument is created and added to parent statement.
|
QName |
getArgumentName()
Returns name of statement argument or null, if statement does not have
argument.
|
Class<? extends DeclaredStatement<?>> |
getDeclaredRepresentationClass()
Returns class which represents declared version of statement associated
with this definition.
|
Class<? extends EffectiveStatement<?,?>> |
getEffectiveRepresentationClass()
Returns class which represents derived behaviour from supplied statement.
|
StatementDefinition |
getPublicView()
Returns public statement definition, which will be present in built
statements.
|
QName |
getStatementName()
Returns name of the statement
|
protected abstract SubstatementValidator |
getSubstatementValidator()
Returns corresponding substatement validator of a statement support
|
StatementSupport<?,?,?> |
getSupportSpecificForArgument(String argument)
If this support has argument specific supports, the method returns
support specific for given argument (e.g.
|
boolean |
hasArgumentSpecificSupports()
Returns true if this support has argument specific supports.
|
boolean |
isArgumentYinElement()
Returns true, if argument of statement is represented as value of yin
element.
|
void |
onFullDefinitionDeclared(StmtContext.Mutable<A,D,E> stmt)
Invoked when statement is closed during
ModelProcessingPhase.FULL_DECLARATION phase. |
void |
onLinkageDeclared(StmtContext.Mutable<A,D,E> stmt)
Invoked when statement is closed during
ModelProcessingPhase.SOURCE_LINKAGE phase, only substatements
from this and previous phase are available. |
void |
onPreLinkageDeclared(StmtContext.Mutable<A,D,E> stmt)
Invoked when statement is closed during
ModelProcessingPhase.SOURCE_PRE_LINKAGE phase, only substatements
from this and previous phase are available. |
void |
onStatementAdded(StmtContext.Mutable<A,D,E> stmt)
Invoked when a statement supported by this instance is added to build context.
|
void |
onStatementDefinitionDeclared(StmtContext.Mutable<A,D,E> stmt)
Invoked when statement is closed during
ModelProcessingPhase.STATEMENT_DEFINITION phase, only
substatements from this phase are available. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetUnknownStatementDefinitionOf, internArgument, isIgnoringConfig, isIgnoringIfFeatures, parseArgumentValuecreateDeclared, createEffectiveprotected AbstractStatementSupport(StatementDefinition publicDefinition)
@Nonnull public final QName getStatementName()
StatementDefinitiongetStatementName in interface StatementDefinitionpublic final QName getArgumentName()
StatementDefinitiongetArgumentName in interface StatementDefinition@Nonnull public final Class<? extends DeclaredStatement<?>> getDeclaredRepresentationClass()
StatementDefinitiongetDeclaredRepresentationClass in interface StatementDefinition@Nonnull public final Class<? extends EffectiveStatement<?,?>> getEffectiveRepresentationClass()
StatementDefinitiongetEffectiveRepresentationClass in interface StatementDefinitionpublic final StatementDefinition getPublicView()
StatementSupportgetPublicView in interface StatementSupport<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>public Optional<StatementContextBase<?,?,?>> beforeSubStatementCreated(StmtContext.Mutable<?,?,?> stmt, int offset, StatementDefinitionContext<?,?,?> def, StatementSourceReference ref, String argument)
StatementSupportbeforeSubStatementCreated in interface StatementSupport<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>stmt - Context of parent statement where a new substatement should be
created. No substatements are available.offset - substatement offsetdef - definition contextref - source referenceargument - substatement argumentpublic void onStatementAdded(StmtContext.Mutable<A,D,E> stmt)
StatementSupportStmtContext.getParentContext(). One such use is populating the parent's namespaces to
allow it to locate this child statement.onStatementAdded in interface StatementSupport<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>stmt - Context of added statement. No substatements are available.public void onPreLinkageDeclared(StmtContext.Mutable<A,D,E> stmt)
ModelProcessingPhase.SOURCE_PRE_LINKAGE phase, only substatements
from this and previous phase are available.
Implementation may use method to perform actions on this event or
register modification action using
StmtContext.Mutable.newInferenceAction(ModelProcessingPhase).
Subclasses of this class may override this method to perform actions on
this event or register modification action using
StmtContext.Mutable.newInferenceAction(ModelProcessingPhase).onPreLinkageDeclared in interface StatementSupport<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>stmt - Context of added statement.public void onLinkageDeclared(StmtContext.Mutable<A,D,E> stmt)
ModelProcessingPhase.SOURCE_LINKAGE phase, only substatements
from this and previous phase are available.
Implementation may use method to perform actions on this event or
register modification action using
StmtContext.Mutable.newInferenceAction(ModelProcessingPhase).
Subclasses of this class may override this method to perform actions on
this event or register modification action using
StmtContext.Mutable.newInferenceAction(ModelProcessingPhase).onLinkageDeclared in interface StatementSupport<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>stmt - Context of added statement.public void onStatementDefinitionDeclared(StmtContext.Mutable<A,D,E> stmt)
ModelProcessingPhase.STATEMENT_DEFINITION phase, only
substatements from this phase are available.
Implementation may use method to perform actions on this event or
register modification action using
StmtContext.Mutable.newInferenceAction(ModelProcessingPhase).
Subclasses of this class may override this method to perform actions on
this event or register modification action using
StmtContext.Mutable.newInferenceAction(ModelProcessingPhase).onStatementDefinitionDeclared in interface StatementSupport<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>stmt - Context of added statement. Argument and statement parent is
accessible.public void onFullDefinitionDeclared(StmtContext.Mutable<A,D,E> stmt)
ModelProcessingPhase.FULL_DECLARATION phase.
Invoked when statement is closed during
ModelProcessingPhase.FULL_DECLARATION phase, only substatements
from this phase are available.
Implementation may use method to perform actions on this event or
register modification action using
StmtContext.Mutable.newInferenceAction(ModelProcessingPhase).
Subclasses of this class may override this method to perform actions on
this event or register modification action using
StmtContext.Mutable.newInferenceAction(ModelProcessingPhase).onFullDefinitionDeclared in interface StatementSupport<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>stmt - Context of added statement. Argument and statement parent is
accessible.public boolean isArgumentYinElement()
StatementDefinitionisArgumentYinElement in interface StatementDefinitionpublic boolean hasArgumentSpecificSupports()
StatementSupporthasArgumentSpecificSupports in interface StatementSupport<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>public StatementSupport<?,?,?> getSupportSpecificForArgument(String argument)
StatementSupportgetSupportSpecificForArgument in interface StatementSupport<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>argument - argument of statement@Nullable protected abstract SubstatementValidator getSubstatementValidator()
Copyright © 2018 OpenDaylight. All rights reserved.