Enum ModelProcessingPhase
- java.lang.Object
-
- java.lang.Enum<ModelProcessingPhase>
-
- org.opendaylight.yangtools.yang.parser.spi.meta.ModelProcessingPhase
-
- All Implemented Interfaces:
Serializable
,Comparable<ModelProcessingPhase>
@NonNullByDefault public enum ModelProcessingPhase extends Enum<ModelProcessingPhase>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ModelProcessingPhase.ExecutionOrder
The concept of phase execution order, expressed as non-negative values.
-
Enum Constant Summary
Enum Constants Enum Constant Description EFFECTIVE_MODEL
FULL_DECLARATION
INIT
SOURCE_LINKAGE
Cross-source relationship resolution phase.SOURCE_PRE_LINKAGE
Preliminary cross-source relationship resolution phase which collects available module names and module namespaces.STATEMENT_DEFINITION
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description byte
executionOrder()
Return the execution order, which is a value in range1..127
.@Nullable ModelProcessingPhase
getPreviousPhase()
Return the preceding phase, or null if this phase is the first one.boolean
isCompletedBy(@Nullable ModelProcessingPhase other)
Determine whether this processing phase is implied to have completed by completion of some other phase.static @Nullable ModelProcessingPhase
ofExecutionOrder(byte executionOrder)
Return theModelProcessingPhase
corresponding to aModelProcessingPhase.ExecutionOrder
value.static ModelProcessingPhase
valueOf(String name)
Returns the enum constant of this type with the specified name.static ModelProcessingPhase[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INIT
public static final ModelProcessingPhase INIT
-
SOURCE_PRE_LINKAGE
public static final ModelProcessingPhase SOURCE_PRE_LINKAGE
Preliminary cross-source relationship resolution phase which collects available module names and module namespaces. It is necessary in order to correct resolution of unknown statements used in linkage phase (e.g. semantic version of YANG modules).
-
SOURCE_LINKAGE
public static final ModelProcessingPhase SOURCE_LINKAGE
Cross-source relationship resolution phase.In this phase of processing only statements which affects cross-source relationship (e.g. imports / includes) are processed.
At end of this phase all source related contexts should be bind to their imports and includes to allow visibility of custom defined statements in subsequent phases.
-
STATEMENT_DEFINITION
public static final ModelProcessingPhase STATEMENT_DEFINITION
-
FULL_DECLARATION
public static final ModelProcessingPhase FULL_DECLARATION
-
EFFECTIVE_MODEL
public static final ModelProcessingPhase EFFECTIVE_MODEL
-
-
Method Detail
-
values
public static ModelProcessingPhase[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ModelProcessingPhase c : ModelProcessingPhase.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ModelProcessingPhase valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
getPreviousPhase
public @Nullable ModelProcessingPhase getPreviousPhase()
Return the preceding phase, or null if this phase is the first one.- Returns:
- Preceding phase, if there is one
-
isCompletedBy
public boolean isCompletedBy(@Nullable ModelProcessingPhase other)
Determine whether this processing phase is implied to have completed by completion of some other phase. Algebraically this means that other is not null and is either this phase or itsgetPreviousPhase()
chain contains this phase.- Parameters:
other
- Other phase- Returns:
- True if this phase completes no later than specified phase.
-
executionOrder
public byte executionOrder()
Return the execution order, which is a value in range1..127
.- Returns:
- Execution order
-
ofExecutionOrder
public static @Nullable ModelProcessingPhase ofExecutionOrder(byte executionOrder)
Return theModelProcessingPhase
corresponding to aModelProcessingPhase.ExecutionOrder
value.- Parameters:
executionOrder
- Execution order- Returns:
- Corresponding value, or null for
ModelProcessingPhase.ExecutionOrder.NULL
- Throws:
IllegalArgumentException
- if the execution order is invalid
-
-