Class InjectionPointData
java.lang.Object
org.spongepowered.asm.mixin.injection.struct.InjectionPointData
Data read from an
At annotation
and passed into an InjectionPoint ctor-
Constructor Summary
ConstructorsConstructorDescriptionInjectionPointData(IInjectionPointContext context, String at, List<String> args, String target, String slice, int ordinal, int opcode, String id) -
Method Summary
Modifier and TypeMethodDescriptionGet the supplied value from the named args as a target selector, throws an exception if the argument cannot be parsed as a target selectorbooleanGet the supplied value from the named args, return defaultValue if the arg is not setintGet the supplied value from the named args, return defaultValue if the arg is not setGet the supplied value from the named args, return defaultValue if the arg is not setgetAt()Get the at value on the injectorGet the injection point contextGet a description of this injector for use in error messagesgetId()Get the id specified on the injection point (or null if not specified)Get the message sink for this injection pointorg.objectweb.asm.tree.MethodNodeGet the annotated methodorg.objectweb.asm.TypeGet the return type of the annotated methodgetMixin()Get the mixin contextintGet the opcode specified on the injection pointintgetOpcode(int defaultOpcode) Get the opcode specified on the injection point or return the default if no opcode was specifiedintgetOpcode(int defaultOpcode, int... validOpcodes) Get the opcode specified on the injection point or return the default if no opcode was specified or if the specified opcode does not appear in the supplied list of valid opcodesintGet the ordinal specified on the injection pointorg.objectweb.asm.tree.AnnotationNodeGet the root annotation (eg.Get the selector value parsed from the injectorgetSlice()Get the slice id specified on the injectorGet the target value specified on the injectorgetType()Get the parsed constructor type for this injectorstatic StringParse a constructor type from the supplied at stringtoString()
-
Constructor Details
-
InjectionPointData
-
-
Method Details
-
getMessageSink
Get the message sink for this injection point -
getAt
Get the at value on the injector -
getType
Get the parsed constructor type for this injector -
getSelector
Get the selector value parsed from the injector -
getContext
Get the injection point context -
getMixin
Get the mixin context -
getMethod
public org.objectweb.asm.tree.MethodNode getMethod()Get the annotated method -
getMethodReturnType
public org.objectweb.asm.Type getMethodReturnType()Get the return type of the annotated method -
getParent
public org.objectweb.asm.tree.AnnotationNode getParent()Get the root annotation (eg.Inject) -
getSlice
Get the slice id specified on the injector -
getLocalVariableDiscriminator
-
get
Get the supplied value from the named args, return defaultValue if the arg is not set- Parameters:
key- argument namedefaultValue- value to return if the arg is not set- Returns:
- argument value or default if not set
-
get
Get the supplied value from the named args, return defaultValue if the arg is not set- Parameters:
key- argument namedefaultValue- value to return if the arg is not set- Returns:
- argument value or default if not set
-
get
Get the supplied value from the named args, return defaultValue if the arg is not set- Parameters:
key- argument namedefaultValue- value to return if the arg is not set- Returns:
- argument value or default if not set
-
get
Get the supplied value from the named args as a target selector, throws an exception if the argument cannot be parsed as a target selector- Parameters:
key- argument name- Returns:
- argument value as a target selector
-
getTarget
Get the target value specified on the injector -
getDescription
Get a description of this injector for use in error messages -
getOrdinal
public int getOrdinal()Get the ordinal specified on the injection point -
getOpcode
public int getOpcode()Get the opcode specified on the injection point -
getOpcode
public int getOpcode(int defaultOpcode) Get the opcode specified on the injection point or return the default if no opcode was specified- Parameters:
defaultOpcode- opcode to return if none specified- Returns:
- opcode or default
-
getOpcode
public int getOpcode(int defaultOpcode, int... validOpcodes) Get the opcode specified on the injection point or return the default if no opcode was specified or if the specified opcode does not appear in the supplied list of valid opcodes- Parameters:
defaultOpcode- opcode to return if none specifiedvalidOpcodes- valid opcodes- Returns:
- opcode or default
-
getId
Get the id specified on the injection point (or null if not specified) -
toString
-
parseType
Parse a constructor type from the supplied at string- Parameters:
at- at to parse- Returns:
- parsed constructor type
-