Enum Class StatementSupport.CopyPolicy
java.lang.Object
java.lang.Enum<StatementSupport.CopyPolicy>
org.opendaylight.yangtools.yang.parser.spi.meta.StatementSupport.CopyPolicy
- All Implemented Interfaces:
Serializable,Comparable<StatementSupport.CopyPolicy>,Constable
- Enclosing class:
- StatementSupport<A,
D extends org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement<A>, E extends org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement<A, D>>
Statement context copy policy, indicating how should reactor handle statement copy operations. Every statement
copied by the reactor is subject to this policy.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionReuse the source statement context in the new place, as it cannot be affected by any further operations.Create a copy sharing declared instance, but otherwise having a separate disconnected lifecycle.Reuse the source statement context in the new place completely.Ignore this statement's existence for the purposes of the new place -- it is not impacted.Reject any attempt to copy this statement. -
Method Summary
Modifier and TypeMethodDescriptionstatic StatementSupport.CopyPolicyReturns the enum constant of this class with the specified name.static StatementSupport.CopyPolicy[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CONTEXT_INDEPENDENT
Reuse the source statement context in the new place, as it cannot be affected by any further operations. This implies that the semantics of the effective statement are not affected by any of its substatements. Each of the substatements is free to make its own policy.This policy is typically used by static constant statements such as
descriptionorlength, where the baseline RFC7950 does not allow any impact. Adescriptioncould hold an extension statement in which case this interaction would come into play. Normal YANG will see empty substatements, so the reactor will be free to complete reuse the context.In case any substatement is of stronger policy, it is up to the reactor to handle correct handling of resulting subobjects.
-
EXACT_REPLICA
Reuse the source statement context in the new place completely. This policy is more stringent thanCONTEXT_INDEPENDENTin that the statement is dependent on circumstances of its original definition and any copy operation must replicate it exactly as is. This implies ignoring the usual policy of its substatements. A typical example of such a statement istype. -
DECLARED_COPY
Create a copy sharing declared instance, but otherwise having a separate disconnected lifecycle. -
REJECT
Reject any attempt to copy this statement. This is useful for statements that are defined as top-level constructs, such ascontact,deviationand similar. -
IGNORE
Ignore this statement's existence for the purposes of the new place -- it is not impacted. This guidance is left here for completeness, as it can have justifiable uses (but I can't think of any). Any substatements need to be ignored, too.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-