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 |
---|---|
StatementDefinition |
getPublicView()
Returns public statement definition, which will be present in built statements.
|
protected abstract @Nullable 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.
|
void |
onFullDefinitionDeclared(StmtContext.Mutable<A,D,E> stmt)
Invoked when statement is closed during
ModelProcessingPhase.FULL_DECLARATION phase,
only substatements from this phase are available. |
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, wait
adaptArgumentValue, getArgumentName, getDeclaredRepresentationClass, getEffectiveRepresentationClass, getStatementName, getUnknownStatementDefinitionOf, internArgument, isArgumentYinElement, isIgnoringConfig, isIgnoringIfFeatures, parseArgumentValue
createDeclared, createEffective
protected AbstractStatementSupport(StatementDefinition publicDefinition)
public final StatementDefinition getPublicView()
StatementSupport
Public statement definition may be used to provide different implementation of statement definition, which will not retain any build specific data or context.
getPublicView
in interface StatementSupport<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>
public void onStatementAdded(StmtContext.Mutable<A,D,E> stmt)
StatementSupport
StmtContext.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 a 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 a 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 a 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,
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 a 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 hasArgumentSpecificSupports()
StatementSupport
hasArgumentSpecificSupports
in interface StatementSupport<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>
public StatementSupport<?,?,?> getSupportSpecificForArgument(String argument)
StatementSupport
getSupportSpecificForArgument
in interface StatementSupport<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>
argument
- argument of statementprotected abstract @Nullable SubstatementValidator getSubstatementValidator()
Copyright © 2019 OpenDaylight. All rights reserved.