public abstract class StatementContextBase<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>> extends Object implements StmtContext.Mutable<A,D,E>
StmtContext.Mutable<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>| Modifier and Type | Method and Description |
|---|---|
void |
addAsEffectOfStatement(Collection<? extends StmtContext<?,?,?>> ctxs) |
void |
addAsEffectOfStatement(StmtContext<?,?,?> ctx) |
<K,KT extends K,N extends StatementNamespace<K,?,?>> |
addContext(Class<N> namespace,
KT key,
StmtContext<?,?,?> stmt)
adds statement to namespace map with the key
|
<K,N extends StatementNamespace<K,?,?>> |
addContextToNamespace(Class<N> type,
K key,
StmtContext<?,?,?> value) |
void |
addEffectiveSubstatement(StmtContext.Mutable<?,?,?> substatement)
adds effective statement to collection of substatements
|
void |
addEffectiveSubstatements(Collection<? extends StmtContext.Mutable<?,?,?>> substatements)
adds effective statement to collection of substatements
|
<K,V,KT extends K,VT extends V,N extends IdentifierNamespace<K,V>> |
addToNs(Class<N> type,
KT key,
VT value) |
protected com.google.common.base.MoreObjects.ToStringHelper |
addToStringAttributes(com.google.common.base.MoreObjects.ToStringHelper toStringHelper) |
D |
buildDeclared()
Builds
DeclaredStatement for statement context. |
E |
buildEffective()
Builds
EffectiveStatement for statement context |
protected void |
checkLocalNamespaceAllowed(Class<? extends IdentifierNamespace<?,?>> type) |
<CA,CD extends DeclaredStatement<CA>,CE extends EffectiveStatement<CA,CD>> |
createSubstatement(int offset,
StatementDefinitionContext<CA,CD,CE> def,
StatementSourceReference ref,
String argument)
Create a new substatement at the specified offset.
|
Collection<? extends StmtContext<?,?,?>> |
declaredSubstatements()
Return declared substatements.
|
protected StatementDefinitionContext<A,D,E> |
definition() |
Collection<? extends StmtContext<?,?,?>> |
effectiveSubstatements()
Return effective substatements.
|
<K,V,N extends IdentifierNamespace<K,V>> |
getAllFromCurrentStmtCtxNamespace(Class<N> type) |
<K,V,N extends IdentifierNamespace<K,V>> |
getAllFromLocalStorage(Class<N> type) |
<K,V,N extends IdentifierNamespace<K,V>> |
getAllFromNamespace(Class<N> type) |
abstract NamespaceBehaviour.Registry |
getBehaviourRegistry() |
ModelProcessingPhase |
getCompletedPhase() |
CopyHistory |
getCopyHistory() |
Collection<? extends StmtContext<?,?,?>> |
getEffectOfStatement() |
<K,V,N extends IdentifierNamespace<K,V>> |
getFromLocalStorage(Class<N> type,
K key) |
<K,V,KT extends K,N extends IdentifierNamespace<K,V>> |
getFromNamespace(Class<N> type,
KT key) |
Optional<StmtContext<?,?,?>> |
getOriginalCtx() |
abstract StatementContextBase<?,?,?> |
getParentContext()
Return the parent statement context, or null if this is the root statement.
|
abstract NamespaceBehaviour.NamespaceStorageNode |
getParentNamespaceStorage() |
StatementDefinition |
getPublicDefinition()
|
abstract RootStatementContext<?,?,?> |
getRoot() |
StatementSource |
getStatementSource() |
StatementSourceReference |
getStatementSourceReference() |
protected abstract boolean |
isIgnoringConfig() |
protected abstract boolean |
isIgnoringIfFeatures() |
protected abstract boolean |
isParentSupportedByFeatures() |
boolean |
isSupportedByFeatures() |
boolean |
isSupportedToBuildEffective() |
Collection<? extends StmtContext.Mutable<?,?,?>> |
mutableDeclaredSubstatements() |
Collection<? extends StmtContext.Mutable<?,?,?>> |
mutableEffectiveSubstatements() |
ModelActionBuilder |
newInferenceAction(ModelProcessingPhase phase)
Create a new inference action to be executed during specified phase.
|
protected <K,V,N extends IdentifierNamespace<K,V>> |
onNamespaceElementAdded(Class<N> type,
K key,
V value)
Occurs when an item is added to model namespace.
|
<K,V,N extends IdentifierNamespace<K,V>> |
putToLocalStorage(Class<N> type,
K key,
V value)
Populate specified namespace with a key/value pair, overwriting previous contents.
|
<K,V,N extends IdentifierNamespace<K,V>> |
putToLocalStorageIfAbsent(Class<N> type,
K key,
V value)
Populate specified namespace with a key/value pair unless the key is already associated with a value.
|
String |
rawStatementArgument() |
void |
removeStatementFromEffectiveSubstatements(StatementDefinition statementDef) |
void |
removeStatementFromEffectiveSubstatements(StatementDefinition statementDef,
String statementArg)
Removes a statement context from the effective substatements
based on its statement definition (i.e statement keyword) and raw (in String form) statement argument.
|
void |
removeStatementsFromEffectiveSubstatements(Collection<? extends StmtContext<?,?,?>> substatements) |
void |
setCompletedPhase(ModelProcessingPhase completedPhase) |
void |
setIsSupportedToBuildEffective(boolean isSupportedToBuildEffective) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddMutableStmtToSeal, addRequiredModule, addToNs, setRootIdentifier, setRootVersioncreateCopy, createCopy, getAllFromCurrentStmtCtxNamespace, getAllFromNamespace, getFromNamespace, getRootVersion, getSchemaPath, getStatementArgument, isConfiguration, isEnabledSemanticVersioninggetStorageNodeTypepublic Collection<? extends StmtContext<?,?,?>> getEffectOfStatement()
getEffectOfStatement in interface StmtContext<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>public void addAsEffectOfStatement(StmtContext<?,?,?> ctx)
addAsEffectOfStatement in interface StmtContext.Mutable<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>public void addAsEffectOfStatement(Collection<? extends StmtContext<?,?,?>> ctxs)
addAsEffectOfStatement in interface StmtContext.Mutable<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>public boolean isSupportedByFeatures()
isSupportedByFeatures in interface StmtContext<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>protected abstract boolean isParentSupportedByFeatures()
protected abstract boolean isIgnoringIfFeatures()
protected abstract boolean isIgnoringConfig()
public boolean isSupportedToBuildEffective()
isSupportedToBuildEffective in interface StmtContext<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>public void setIsSupportedToBuildEffective(boolean isSupportedToBuildEffective)
setIsSupportedToBuildEffective in interface StmtContext.Mutable<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>public CopyHistory getCopyHistory()
getCopyHistory in interface StmtContext<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>public Optional<StmtContext<?,?,?>> getOriginalCtx()
getOriginalCtx in interface StmtContext<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>public ModelProcessingPhase getCompletedPhase()
getCompletedPhase in interface StmtContext<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>public void setCompletedPhase(ModelProcessingPhase completedPhase)
setCompletedPhase in interface StmtContext.Mutable<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>public abstract StatementContextBase<?,?,?> getParentContext()
StmtContextgetParentContext in interface StmtContext<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>getParentContext in interface StmtContext.Mutable<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>@Nonnull public abstract RootStatementContext<?,?,?> getRoot()
getRoot in interface StmtContext<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>getRoot in interface StmtContext.Mutable<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>@Nonnull public StatementSource getStatementSource()
getStatementSource in interface StmtContext<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>@Nonnull public StatementSourceReference getStatementSourceReference()
getStatementSourceReference in interface StmtContext<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>public final String rawStatementArgument()
rawStatementArgument in interface StmtContext<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>@Nonnull public Collection<? extends StmtContext<?,?,?>> declaredSubstatements()
StmtContextdeclaredSubstatements in interface StmtContext<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>@Nonnull public Collection<? extends StmtContext.Mutable<?,?,?>> mutableDeclaredSubstatements()
mutableDeclaredSubstatements in interface StmtContext.Mutable<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>public Collection<? extends StmtContext<?,?,?>> effectiveSubstatements()
StmtContexteffectiveSubstatements in interface StmtContext<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>@Nonnull public Collection<? extends StmtContext.Mutable<?,?,?>> mutableEffectiveSubstatements()
mutableEffectiveSubstatements in interface StmtContext.Mutable<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>public void removeStatementsFromEffectiveSubstatements(Collection<? extends StmtContext<?,?,?>> substatements)
public void removeStatementFromEffectiveSubstatements(StatementDefinition statementDef)
public void removeStatementFromEffectiveSubstatements(StatementDefinition statementDef, String statementArg)
statementDef - statement definition of the statement context to removestatementArg - statement argument of the statement context to removepublic void addEffectiveSubstatement(StmtContext.Mutable<?,?,?> substatement)
substatement - substatementIllegalStateException - if added in declared phaseNullPointerException - if statement parameter is nullpublic void addEffectiveSubstatements(Collection<? extends StmtContext.Mutable<?,?,?>> substatements)
substatements - substatementsIllegalStateException - if added in declared phaseNullPointerException - if statement parameter is nullpublic final <CA,CD extends DeclaredStatement<CA>,CE extends EffectiveStatement<CA,CD>> StatementContextBase<CA,CD,CE> createSubstatement(int offset, StatementDefinitionContext<CA,CD,CE> def, StatementSourceReference ref, String argument)
offset - Substatement offsetdef - definition contextref - source referenceargument - statement argumentpublic D buildDeclared()
StmtContextDeclaredStatement for statement context.buildDeclared in interface StmtContext<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>public E buildEffective()
StmtContextEffectiveStatement for statement contextbuildEffective in interface StmtContext<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>protected final StatementDefinitionContext<A,D,E> definition()
protected void checkLocalNamespaceAllowed(Class<? extends IdentifierNamespace<?,?>> type)
protected <K,V,N extends IdentifierNamespace<K,V>> void onNamespaceElementAdded(Class<N> type, K key, V value)
@Nonnull public StatementDefinition getPublicDefinition()
getPublicDefinition in interface StmtContext<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>public ModelActionBuilder newInferenceAction(ModelProcessingPhase phase)
StmtContext.MutablenewInferenceAction in interface StmtContext.Mutable<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>phase - Target phase in which the action will resolved.public <K,KT extends K,N extends StatementNamespace<K,?,?>> void addContext(Class<N> namespace, KT key, StmtContext<?,?,?> stmt)
StmtContext.MutableaddContext in interface StmtContext.Mutable<A,D extends DeclaredStatement<A>,E extends EffectiveStatement<A,D>>namespace - StatementNamespace child that determines namespace to be added tokey - of type according to namespace class specificationstmt - to be added to namespace mapprotected com.google.common.base.MoreObjects.ToStringHelper addToStringAttributes(com.google.common.base.MoreObjects.ToStringHelper toStringHelper)
public abstract NamespaceBehaviour.NamespaceStorageNode getParentNamespaceStorage()
getParentNamespaceStorage in interface NamespaceBehaviour.NamespaceStorageNodepublic abstract NamespaceBehaviour.Registry getBehaviourRegistry()
@Nonnull public final <K,V,KT extends K,N extends IdentifierNamespace<K,V>> V getFromNamespace(Class<N> type, KT key) throws NamespaceNotAvailableException
NamespaceNotAvailableExceptionpublic final <K,V,N extends IdentifierNamespace<K,V>> Map<K,V> getAllFromNamespace(Class<N> type)
public final <K,V,N extends IdentifierNamespace<K,V>> Map<K,V> getAllFromCurrentStmtCtxNamespace(Class<N> type)
public final <K,V,KT extends K,VT extends V,N extends IdentifierNamespace<K,V>> void addToNs(Class<N> type, KT key, VT value) throws NamespaceNotAvailableException
NamespaceNotAvailableExceptionpublic final <K,N extends StatementNamespace<K,?,?>> void addContextToNamespace(Class<N> type, K key, StmtContext<?,?,?> value) throws NamespaceNotAvailableException
NamespaceNotAvailableExceptionpublic <K,V,N extends IdentifierNamespace<K,V>> V getFromLocalStorage(Class<N> type, K key)
getFromLocalStorage in interface NamespaceBehaviour.NamespaceStorageNodepublic <K,V,N extends IdentifierNamespace<K,V>> Map<K,V> getAllFromLocalStorage(Class<N> type)
getAllFromLocalStorage in interface NamespaceBehaviour.NamespaceStorageNodepublic <K,V,N extends IdentifierNamespace<K,V>> V putToLocalStorage(Class<N> type, K key, V value)
NamespaceBehaviour.NamespaceStorageNodeMap.put(Object, Object).putToLocalStorage in interface NamespaceBehaviour.NamespaceStorageNodetype - Namespace identifierkey - Keyvalue - Valuepublic <K,V,N extends IdentifierNamespace<K,V>> V putToLocalStorageIfAbsent(Class<N> type, K key, V value)
NamespaceBehaviour.NamespaceStorageNodeMap.putIfAbsent(Object, Object).putToLocalStorageIfAbsent in interface NamespaceBehaviour.NamespaceStorageNodetype - Namespace identifierkey - Keyvalue - ValueCopyright © 2018 OpenDaylight. All rights reserved.