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() |
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, wait
adaptArgumentValue, getArgumentName, getDeclaredRepresentationClass, getEffectiveRepresentationClass, getStatementName, getUnknownStatementDefinitionOf, internArgument, isArgumentYinElement, isIgnoringConfig, isIgnoringIfFeatures
protected abstract StatementSupport<A,D,E> delegate()
delegate
in class com.google.common.collect.ForwardingObject
public D createDeclared(StmtContext<A,D,?> ctx)
StatementFactory
DeclaredStatement
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)
StatementFactory
EffectiveStatement
for specified context.createEffective
in interface StatementFactory<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>
ctx
- Statement contextpublic 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 A parseArgumentValue(StmtContext<?,?,?> ctx, String value)
StatementSupport
parseArgumentValue
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)
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)
StatementSupport
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)
.
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)
StatementSupport
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)
.
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)
StatementSupport
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)
.
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)
StatementSupport
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)
.
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 statementCopyright © 2019 OpenDaylight. All rights reserved.