Class ForwardingStatementSupport<A,D extends org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement<A>,E extends org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement<A,D>>
java.lang.Object
org.opendaylight.yangtools.yang.parser.spi.meta.StatementSupport<A,D,E>
org.opendaylight.yangtools.yang.parser.spi.meta.ForwardingStatementSupport<A,D,E>
- Type Parameters:
A- Argument typeD- Declared Statement representationE- Effective Statement representation
- All Implemented Interfaces:
StatementFactory<A,D, E>
@Beta
public abstract class ForwardingStatementSupport<A,D extends org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement<A>,E extends org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement<A,D>>
extends StatementSupport<A,D,E>
Utility forwarding implementation of
StatementSupport contract. This class is useful for implementing
wrapped statements.- Author:
- Robert Varga
-
Nested Class Summary
Nested classes/interfaces inherited from class org.opendaylight.yangtools.yang.parser.spi.meta.StatementSupport
StatementSupport.CopyPolicy, StatementSupport.StatementEquality<A,D extends org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement<A>>, StatementSupport.StatementPolicy<A, D extends org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement<A>> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedForwardingStatementSupport(StatementSupport<A, D, E> delegate) -
Method Summary
Modifier and TypeMethodDescriptioncopyEffective(EffectiveStmtCtx.Current<A, D> stmt, E original) Create aEffectiveStatementcopy of provided original for specified context.createDeclared(BoundStmtCtx<A> ctx, Stream<org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement<?>> substatements) Create aDeclaredStatementfor specified context.createEffective(EffectiveStmtCtx.Current<A, D> stmt, Stream<? extends StmtContext<?, ?, ?>> declaredSubstatements, Stream<? extends StmtContext<?, ?, ?>> inferredSubstatements) Create aEffectiveStatementfor specified context.StatementSupport<?,?, ?> getSupportSpecificForArgument(String argument) If this support has argument specific supports, the method returns support specific for given argument (e.g.booleanReturns true if this support has argument specific supports.voidInvoked when statement is closed duringModelProcessingPhase.FULL_DECLARATIONphase, only substatements from this phase are available.voidonLinkageDeclared(StmtContext.Mutable<A, D, E> stmt) Invoked when statement is closed duringModelProcessingPhase.SOURCE_LINKAGEphase, only substatements from this and previous phase are available.voidonPreLinkageDeclared(StmtContext.Mutable<A, D, E> stmt) Invoked when statement is closed duringModelProcessingPhase.SOURCE_PRE_LINKAGEphase, only substatements from this and previous phase are available.voidonStatementAdded(StmtContext.Mutable<A, D, E> stmt) Invoked when a statement supported by this instance is added to build context.voidInvoked when statement is closed duringModelProcessingPhase.STATEMENT_DEFINITIONphase, only substatements from this phase are available.parseArgumentValue(StmtContext<?, ?, ?> ctx, String value) Parses textual representation of argument in object representation.protected SubstatementValidatorReturns corresponding substatement validator of a statement support.toString()Methods inherited from class org.opendaylight.yangtools.yang.parser.spi.meta.StatementSupport
adaptArgumentValue, argumentName, canReuseCurrent, copyPolicy, definition, extractEffectiveState, getArgumentDefinition, getPublicView, internArgument, isIgnoringConfig, isIgnoringIfFeatures, statementName
-
Constructor Details
-
ForwardingStatementSupport
-
-
Method Details
-
createDeclared
public D createDeclared(BoundStmtCtx<A> ctx, Stream<org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement<?>> substatements) Description copied from interface:StatementFactoryCreate aDeclaredStatementfor specified context.- Parameters:
ctx- Statement contextsubstatements- Declared substatements- Returns:
- A declared statement instance.
-
createEffective
public E createEffective(EffectiveStmtCtx.Current<A, D> stmt, Stream<? extends StmtContext<?, ?, ?>> declaredSubstatements, Stream<? extends StmtContext<?, ?, ?>> inferredSubstatements) Description copied from interface:StatementFactoryCreate aEffectiveStatementfor specified context.- Parameters:
stmt- Effective capture of this statement's significant statedeclaredSubstatements- effectively-visible declared substatementsinferredSubstatements- effectively-visible inferred substatements- Returns:
- An effective statement instance
-
copyEffective
Description copied from interface:StatementFactoryCreate aEffectiveStatementcopy of provided original for specified context.- Parameters:
stmt- Effective capture of this statement's significant stateoriginal- Original effective statement- Returns:
- An effective statement instance
-
parseArgumentValue
Description copied from class:StatementSupportParses textual representation of argument in object representation.- Specified by:
parseArgumentValuein classStatementSupport<A,D extends org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement<A>, E extends org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement<A, D>> - Parameters:
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.- Returns:
- Parsed value
-
onStatementAdded
Description copied from class:StatementSupportInvoked when a statement supported by this instance is added to build context. This allows implementations of this interface to start tracking the statement and perform any modifications to the build context hierarchy, accessible viaStmtContext.getParentContext(). One such use is populating the parent's namespaces to allow it to locate this child statement.- Overrides:
onStatementAddedin classStatementSupport<A,D extends org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement<A>, E extends org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement<A, D>> - Parameters:
stmt- Context of added statement. No substatements are available.
-
onPreLinkageDeclared
Description copied from class:StatementSupportInvoked when statement is closed duringModelProcessingPhase.SOURCE_PRE_LINKAGEphase, 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).- Overrides:
onPreLinkageDeclaredin classStatementSupport<A,D extends org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement<A>, E extends org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement<A, D>> - Parameters:
stmt- Context of added statement.
-
onLinkageDeclared
Description copied from class:StatementSupportInvoked when statement is closed duringModelProcessingPhase.SOURCE_LINKAGEphase, 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).- Overrides:
onLinkageDeclaredin classStatementSupport<A,D extends org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement<A>, E extends org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement<A, D>> - Parameters:
stmt- Context of added statement.
-
onStatementDefinitionDeclared
Description copied from class:StatementSupportInvoked when statement is closed duringModelProcessingPhase.STATEMENT_DEFINITIONphase, 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).- Overrides:
onStatementDefinitionDeclaredin classStatementSupport<A,D extends org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement<A>, E extends org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement<A, D>> - Parameters:
stmt- Context of added statement. Argument and statement parent is accessible.
-
onFullDefinitionDeclared
Description copied from class:StatementSupportInvoked when statement is closed duringModelProcessingPhase.FULL_DECLARATIONphase, 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).- Overrides:
onFullDefinitionDeclaredin classStatementSupport<A,D extends org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement<A>, E extends org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement<A, D>> - Parameters:
stmt- Context of added statement. Argument and statement parent is accessible.
-
hasArgumentSpecificSupports
public boolean hasArgumentSpecificSupports()Description copied from class:StatementSupportReturns true if this support has argument specific supports.- Overrides:
hasArgumentSpecificSupportsin classStatementSupport<A,D extends org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement<A>, E extends org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement<A, D>> - Returns:
- true if this support has argument specific supports.
-
getSupportSpecificForArgument
Description copied from class:StatementSupportIf this support has argument specific supports, the method returns support specific for given argument (e.g. type statement support need to be specialized based on its argument), otherwise returns null.- Overrides:
getSupportSpecificForArgumentin classStatementSupport<A,D extends org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement<A>, E extends org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement<A, D>> - Parameters:
argument- argument of statement- Returns:
- statement support specific for supplied argument or null
-
substatementValidator
Description copied from class:StatementSupportReturns corresponding substatement validator of a statement support.- Specified by:
substatementValidatorin classStatementSupport<A,D extends org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement<A>, E extends org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement<A, D>> - Returns:
- substatement validator or null, if substatement validator is not defined
-
toString
-