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>>

public static enum StatementSupport.CopyPolicy extends Enum<StatementSupport.CopyPolicy>
Statement context copy policy, indicating how should reactor handle statement copy operations. Every statement copied by the reactor is subject to this policy.
  • Enum Constant Details

    • CONTEXT_INDEPENDENT

      public static final StatementSupport.CopyPolicy 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 description or length, where the baseline RFC7950 does not allow any impact. A description could 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

      public static final StatementSupport.CopyPolicy EXACT_REPLICA
      Reuse the source statement context in the new place completely. This policy is more stringent than CONTEXT_INDEPENDENT in 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 is type.
    • DECLARED_COPY

      public static final StatementSupport.CopyPolicy DECLARED_COPY
      Create a copy sharing declared instance, but otherwise having a separate disconnected lifecycle.
    • REJECT

      public static final StatementSupport.CopyPolicy REJECT
      Reject any attempt to copy this statement. This is useful for statements that are defined as top-level constructs, such as contact, deviation and similar.
    • IGNORE

      public static final StatementSupport.CopyPolicy 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

      public static StatementSupport.CopyPolicy[] 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

      public static StatementSupport.CopyPolicy valueOf(String name)
      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 name
      NullPointerException - if the argument is null