public class AnnotatedMethodInfo extends java.lang.Object implements IInjectionPointContext
| Modifier and Type | Field and Description |
|---|---|
protected org.objectweb.asm.tree.AnnotationNode |
annotation
Annotation on the method
|
protected java.lang.String |
annotationType
Human-readable annotation type
|
protected org.objectweb.asm.tree.MethodNode |
method
Annotated method
|
protected java.lang.String |
methodName
Original name of the method, if available
|
| Constructor and Description |
|---|
AnnotatedMethodInfo(IMixinContext mixin,
org.objectweb.asm.tree.MethodNode method,
org.objectweb.asm.tree.AnnotationNode annotation) |
| Modifier and Type | Method and Description |
|---|---|
void |
addMessage(java.lang.String format,
java.lang.Object... args)
Add a new message
|
IAnnotationHandle |
getAnnotation()
Get the primary annotation which makes this method special
|
org.objectweb.asm.tree.AnnotationNode |
getAnnotationNode()
Get the primary annotation which makes this method special
|
static java.lang.String |
getDynamicInfo(IAnnotatedElement method)
Get info from a decorating
Dynamic annotation. |
static java.lang.String |
getDynamicInfo(org.objectweb.asm.tree.MethodNode method)
Get info from a decorating
Dynamic annotation. |
static java.lang.String |
getDynamicInfo(java.lang.Object method)
Get info from a decorating
Dynamic annotation. |
java.lang.String |
getElementDescription()
Get a human-readable description of the annotation on the method for use
in error messages
|
org.objectweb.asm.tree.MethodNode |
getMethod()
Get method being called
|
java.lang.String |
getMethodName()
Get the original name of the method, if available
|
IMixinContext |
getMixin()
Get the mixin target context for this annotated method
|
ISelectorContext |
getParent()
Get the parent (outer/containing) context.
|
IAnnotationHandle |
getSelectorAnnotation()
Get the annotation context for selectors operating in the context of this
method.
|
java.lang.String |
getSelectorCoordinate(boolean leaf)
Get the selector coordinate for this method
|
java.lang.String |
remap(java.lang.String reference)
Remap a reference in the context of this selector, usually via the local
refmap of the mixin configuration but can be overridden as needed, for
example to provide selector-local remap behaviour.
|
protected final org.objectweb.asm.tree.MethodNode method
protected final org.objectweb.asm.tree.AnnotationNode annotation
protected final java.lang.String annotationType
protected final java.lang.String methodName
public AnnotatedMethodInfo(IMixinContext mixin, org.objectweb.asm.tree.MethodNode method, org.objectweb.asm.tree.AnnotationNode annotation)
public final java.lang.String getElementDescription()
getElementDescription in interface ISelectorContextpublic java.lang.String remap(java.lang.String reference)
ISelectorContextremap in interface ISelectorContextreference - Reference to remappublic ISelectorContext getParent()
ISelectorContextgetParent in interface ISelectorContextpublic final IMixinContext getMixin()
getMixin in interface ISelectorContextpublic final org.objectweb.asm.tree.MethodNode getMethod()
getMethod in interface IInjectionPointContextgetMethod in interface ISelectorContextpublic java.lang.String getMethodName()
public org.objectweb.asm.tree.AnnotationNode getAnnotationNode()
getAnnotationNode in interface IInjectionPointContextpublic final IAnnotationHandle getAnnotation()
getAnnotation in interface ISelectorContextpublic IAnnotationHandle getSelectorAnnotation()
getSelectorAnnotation in interface ISelectorContextpublic java.lang.String getSelectorCoordinate(boolean leaf)
getSelectorCoordinate in interface ISelectorContextleaf - True if getting the coordinate when this element is a leaf,
false if getting the coordinate when it is a parentpublic void addMessage(java.lang.String format,
java.lang.Object... args)
IMessageSinkaddMessage in interface IMessageSinkformat - Message formatargs - Message argspublic static final java.lang.String getDynamicInfo(java.lang.Object method)
Dynamic annotation. If the annotation
is present, a descriptive string suitable for inclusion in an error
message is returned. If the annotation is not present then an empty
string is returned.method - method to inspectpublic static final java.lang.String getDynamicInfo(org.objectweb.asm.tree.MethodNode method)
Dynamic annotation. If the annotation
is present, a descriptive string suitable for inclusion in an error
message is returned. If the annotation is not present then an empty
string is returned.method - method to inspectpublic static final java.lang.String getDynamicInfo(IAnnotatedElement method)
Dynamic annotation. If the annotation
is present, a descriptive string suitable for inclusion in an error
message is returned. If the annotation is not present then an empty
string is returned.method - method to inspect