A - Argument typeD - Declared Statement representationE - Effective Statement representation@Beta public abstract class ForwardingStatementSupport<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>> extends com.google.common.collect.ForwardingObject implements StatementSupport<A,D,E>
StatementSupport contract. This class is useful for implementing
wrapped statements.| Constructor and Description |
|---|
ForwardingStatementSupport() |
| Modifier and Type | Method and Description |
|---|---|
D |
createDeclared(StmtContext<A,D,?> ctx)
Create a
DeclaredStatement for specified context. |
E |
createEffective(StmtContext<A,D,E> ctx)
Create a
EffectiveStatement for specified context. |
protected abstract StatementSupport<A,D,E> |
delegate() |
Optional<StatementSupport<?,?,?>> |
getImplicitParentFor(StatementDefinition stmtDef)
Returns implicit parent statement support for supplied statement definition, if it is defined.
|
StatementDefinition |
getPublicView()
Returns public statement definition, which will be present in built statements.
|
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. |
A |
parseArgumentValue(StmtContext<?,?,?> ctx,
String value)
Parses textual representation of argument in object representation.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitadaptArgumentValue, getArgumentName, getDeclaredRepresentationClass, getEffectiveRepresentationClass, getStatementName, getUnknownStatementDefinitionOf, internArgument, isArgumentYinElement, isIgnoringConfig, isIgnoringIfFeaturesprotected abstract StatementSupport<A,D,E> delegate()
delegate in class com.google.common.collect.ForwardingObjectpublic D createDeclared(StmtContext<A,D,?> ctx)
StatementFactoryDeclaredStatement for specified context.createDeclared in interface StatementFactory<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>ctx - Statement contextpublic E createEffective(StmtContext<A,D,E> ctx)
StatementFactoryEffectiveStatement for specified context.createEffective in interface StatementFactory<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>ctx - Statement contextpublic StatementDefinition getPublicView()
StatementSupportPublic 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 A parseArgumentValue(StmtContext<?,?,?> ctx, String value)
StatementSupportparseArgumentValue in interface StatementSupport<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>ctx - Context, which may be used to access source-specific namespaces required for parsing.value - String representation of value, as was present in text source.public 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 Optional<StatementSupport<?,?,?>> getImplicitParentFor(StatementDefinition stmtDef)
ImplicitParentAwareStatementSupportgetImplicitParentFor in interface ImplicitParentAwareStatementSupportgetImplicitParentFor in interface StatementSupport<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>stmtDef - statement definition of substatementpublic void onPreLinkageDeclared(StmtContext.Mutable<A,D,E> stmt)
StatementSupportModelProcessingPhase.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).
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)
StatementSupportModelProcessingPhase.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).
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)
StatementSupportModelProcessingPhase.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).
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)
StatementSupportModelProcessingPhase.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).
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()
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 statementCopyright © 2019 OpenDaylight. All rights reserved.