Enum Class InjectionPoint.Specifier

java.lang.Object
java.lang.Enum<InjectionPoint.Specifier>
org.spongepowered.asm.mixin.injection.InjectionPoint.Specifier
All Implemented Interfaces:
Serializable, Comparable<InjectionPoint.Specifier>, Constable
Enclosing class:
InjectionPoint

public static enum InjectionPoint.Specifier extends Enum<InjectionPoint.Specifier>
Additional specifier for injection points. Specifiers can be supplied in At annotations by including a colon (:) character followed by the specifier type (case-sensitive), eg:
@At(value = "INVOKE:LAST", ... )
  • Enum Constant Details

    • ALL

      public static final InjectionPoint.Specifier ALL
      Use all instructions from the query result.
    • FIRST

      public static final InjectionPoint.Specifier FIRST
      Use the first instruction from the query result.
    • LAST

      public static final InjectionPoint.Specifier LAST
      Use the last instruction from the query result.
    • ONE

      public static final InjectionPoint.Specifier ONE
      The query must return exactly one instruction, if it returns more than one instruction this should be considered a fail-fast error state and a runtime exception will be thrown.
    • DEFAULT

      public static final InjectionPoint.Specifier DEFAULT
      Use the default setting as defined by the consumer. For slices this is FIRST, for all other consumers this is ALL
  • Method Details

    • values

      public static InjectionPoint.Specifier[] 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 InjectionPoint.Specifier 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