Package spoon.processing
Enum Class TraversalStrategy
- All Implemented Interfaces:
Serializable,Comparable<TraversalStrategy>,Constable
This enumeration defines the traversal strategies available for a processor.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionWhen this strategy is selected, the processor will traverse the child elements before the parents.When this strategy is selected, the processor will traverse the parent elements before the children. -
Method Summary
Modifier and TypeMethodDescriptionstatic TraversalStrategyReturns the enum constant of this class with the specified name.static TraversalStrategy[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PRE_ORDER
When this strategy is selected, the processor will traverse the parent elements before the children. This implies that if the processor adds new elements to a given model sub-tree, these new elements will be processed too. This strategy can easily lead to complex processing behavior, so it is to be used with care. -
POST_ORDER
When this strategy is selected, the processor will traverse the child elements before the parents. This implies that child elements that are removed by a processor will still be processed before they are removed.
-
-
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
-