Enum Class ClassInfo.Traversal

java.lang.Object
java.lang.Enum<ClassInfo.Traversal>
org.spongepowered.asm.mixin.transformer.ClassInfo.Traversal
All Implemented Interfaces:
Serializable, Comparable<ClassInfo.Traversal>, Constable
Enclosing class:
ClassInfo

public static enum ClassInfo.Traversal extends 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 next property which defines the traversal type to use on the next step of the hierarchy validation. For example, the type IMMEDIATE which requires an immediate match falls through to NONE on the next step, which prevents further traversals from occurring in the lookup.

  • Enum Constant Details

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

    • values

      public static ClassInfo.Traversal[] 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 ClassInfo.Traversal 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
    • 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()