Package spoon.processing
Enum TraversalStrategy
- All Implemented Interfaces:
Serializable
,Comparable<TraversalStrategy>
This enumeration defines the traversal strategies available for a processor.
- See Also:
Processor.getTraversalStrategy()
-
Enum Constant Summary
Enum 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 TraversalStrategy
Returns the enum constant of this type with the specified name.static TraversalStrategy[]
values()
Returns an array containing the constants of this enum type, 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 type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-