Enum ClassInfo.Traversal
- java.lang.Object
-
- java.lang.Enum<ClassInfo.Traversal>
-
- org.spongepowered.asm.mixin.transformer.ClassInfo.Traversal
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<ClassInfo.Traversal>
- Enclosing class:
- ClassInfo
public static enum ClassInfo.Traversal extends java.lang.Enum<ClassInfo.Traversal>
To all intents and purposes, the "real" class hierarchy and the mixin class hierarchy exist in parallel, this means that for some hierarchy validation operations we need to walk across to the other hierarchy in order to allow meaningful validation to occur.
This enum defines the type of traversal operations which are allowed for a particular lookup.
Each traversal type has a
nextproperty which defines the traversal type to use on the next step of the hierarchy validation. For example, the typeIMMEDIATEwhich requires an immediate match falls through toNONEon the next step, which prevents further traversals from occurring in the lookup.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALLTraversal is allowed at all stages.IMMEDIATETraversal is allowed at the bottom of the hierarchy but no further.NONENo traversals are allowed.SUPERTraversal is allowed only on superclasses and not at the bottom of the hierarchy.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanTraverse()Return whether this traversal type allows traversalClassInfo.SearchTypegetSearchType()ClassInfo.Traversalnext()Return the next traversal type for this traversal typestatic ClassInfo.TraversalvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static ClassInfo.Traversal[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NONE
public static final ClassInfo.Traversal NONE
No traversals are allowed.
-
ALL
public static final ClassInfo.Traversal ALL
Traversal is allowed at all stages.
-
IMMEDIATE
public static final ClassInfo.Traversal IMMEDIATE
Traversal is allowed at the bottom of the hierarchy but no further.
-
SUPER
public static final ClassInfo.Traversal SUPER
Traversal is allowed only on superclasses and not at the bottom of the hierarchy.
-
-
Method Detail
-
values
public static ClassInfo.Traversal[] 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 (ClassInfo.Traversal c : ClassInfo.Traversal.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ClassInfo.Traversal valueOf(java.lang.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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
next
public ClassInfo.Traversal next()
Return the next traversal type for this traversal type
-
canTraverse
public boolean canTraverse()
Return whether this traversal type allows traversal
-
getSearchType
public ClassInfo.SearchType getSearchType()
-
-