public class InjectionPointData
extends java.lang.Object
At annotation
and passed into an InjectionPoint ctor| Constructor and Description |
|---|
InjectionPointData(IInjectionPointContext context,
java.lang.String at,
java.util.List<java.lang.String> args,
java.lang.String target,
java.lang.String slice,
int ordinal,
int opcode,
java.lang.String id,
int flags) |
| Modifier and Type | Method and Description |
|---|---|
ITargetSelector |
get(java.lang.String key)
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
|
boolean |
get(java.lang.String key,
boolean defaultValue)
Get the supplied value from the named args, return defaultValue if the
arg is not set
|
int |
get(java.lang.String key,
int defaultValue)
Get the supplied value from the named args, return defaultValue if the
arg is not set
|
java.lang.String |
get(java.lang.String key,
java.lang.String defaultValue)
Get the supplied value from the named args, return defaultValue if the
arg is not set
|
<T extends java.lang.Enum<T>> |
get(java.lang.String key,
T defaultValue)
Get the supplied value from the named args, return defaultValue if the
arg is not set
|
java.lang.String |
getAt()
Get the at value on the injector
|
IInjectionPointContext |
getContext()
Get the injection point context
|
java.lang.String |
getDescription()
Get a description of this injector for use in error messages
|
java.lang.String |
getId()
Get the id specified on the injection point (or null if not specified)
|
LocalVariableDiscriminator |
getLocalVariableDiscriminator() |
IMessageSink |
getMessageSink()
Get the message sink for this injection point
|
org.objectweb.asm.tree.MethodNode |
getMethod()
Get the annotated method
|
org.objectweb.asm.Type |
getMethodReturnType()
Get the return type of the annotated method
|
IMixinContext |
getMixin()
Get the mixin context
|
int |
getOpcode()
Get the opcode specified on the injection point
|
int |
getOpcode(int defaultOpcode)
Get the opcode specified on the injection point or return the default if
no opcode was specified
|
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
|
int[] |
getOpcodeList(java.lang.String key,
int[] defaultValue)
Get a list of opcodes specified in the injection point arguments.
|
int |
getOrdinal()
Get the ordinal specified on the injection point
|
org.objectweb.asm.tree.AnnotationNode |
getParent()
Get the root annotation (eg.
|
java.lang.String |
getSlice()
Get the slice id specified on the injector
|
InjectionPoint.Specifier |
getSpecifier()
Get the specifier value parsed from the injector
|
ITargetSelector |
getTarget()
Get the target value specified on the injector
|
InjectionPoint.RestrictTargetLevel |
getTargetRestriction()
Get the target restriction specified in the annotation
|
java.lang.String |
getType()
Get the parsed constructor type for this injector
|
boolean |
isUnsafe()
Get whether the unsafe option is set on the injection point
|
static java.lang.String |
parseType(java.lang.String at)
Parse a constructor type from the supplied at string
|
java.lang.String |
toString() |
public InjectionPointData(IInjectionPointContext context, java.lang.String at, java.util.List<java.lang.String> args, java.lang.String target, java.lang.String slice, int ordinal, int opcode, java.lang.String id, int flags)
public IMessageSink getMessageSink()
public java.lang.String getAt()
public java.lang.String getType()
public InjectionPoint.Specifier getSpecifier()
public InjectionPoint.RestrictTargetLevel getTargetRestriction()
public IInjectionPointContext getContext()
public IMixinContext getMixin()
public org.objectweb.asm.tree.MethodNode getMethod()
public org.objectweb.asm.Type getMethodReturnType()
public org.objectweb.asm.tree.AnnotationNode getParent()
Inject)public java.lang.String getSlice()
public LocalVariableDiscriminator getLocalVariableDiscriminator()
public java.lang.String get(java.lang.String key,
java.lang.String defaultValue)
key - argument namedefaultValue - value to return if the arg is not setpublic int get(java.lang.String key,
int defaultValue)
key - argument namedefaultValue - value to return if the arg is not setpublic boolean get(java.lang.String key,
boolean defaultValue)
key - argument namedefaultValue - value to return if the arg is not setpublic <T extends java.lang.Enum<T>> T get(java.lang.String key,
T defaultValue)
T - enum typekey - argument namedefaultValue - value to return if the arg is not setpublic ITargetSelector get(java.lang.String key)
key - argument namepublic ITargetSelector getTarget()
public java.lang.String getDescription()
public int getOrdinal()
public int getOpcode()
public int getOpcode(int defaultOpcode)
defaultOpcode - opcode to return if none specifiedpublic int getOpcode(int defaultOpcode,
int... validOpcodes)
defaultOpcode - opcode to return if none specifiedvalidOpcodes - valid opcodespublic int[] getOpcodeList(java.lang.String key,
int[] defaultValue)
Opcodes interface. All the values should
be separated by spaces or commas. The returned array is sorted in order
to make it suitable for use with the Arrays#binarySearch method.key - argument namedefaultValue - value to return if the key is not specifiedpublic java.lang.String getId()
public boolean isUnsafe()
public java.lang.String toString()
toString in class java.lang.Objectpublic static java.lang.String parseType(java.lang.String at)
at - at to parse