@Target(value=METHOD)
@Retention(value=RUNTIME)
public @interface Invoker
The target method for an accessor can be specified as part of the decorated method name (eg. callFoo to invoke a target method named foo()) or specified in the annotation value. Invokers for constructors can be created by specifying <init> in the annotation or the fully-qualified class name.
Invokers provide a simple way of gaining access to internal class members
in a target class without needing to resort to access transformers, and
without the usual need to Shadow a target method. This can both
greatly simplify mixins which only contain accessors, and provide for
faster development than with access transformers since no re-decompile is
needed to put the changes into effect.
Invokers can be used in regular mixins as a way to provide access to a
private method without needing to shadow and then manually proxy the method
call. They can also be used to create "Accessor Mixins" which are
special mixins defined as interfaces which must only contain
Accessor and Invoker methods. Unlike normal mixins however,
Accessor Mixins are accessible via user code and thus no surrogate
"Duck" interface is required to expose the generated methods, the
mixin itself acts as its own Duck.
Accessorpublic abstract java.lang.String value
However sometimes it maye be desirable to name an accessor method differently to the target method. In this case you may specify the method using its name. Use <init> or the fully qualified name of the target class to invoke a constructor.
public abstract boolean remap
Invoker methods since it is
anticipated that in general the target of a Invoker annotation
will be an obfuscated method in the target class. However since it is
possible that the target is not obfuscated, it may be desirable to
suppress the compiler warning which would be generated. Setting this
value to false will cause the annotation processor to skip
remapping for this annotation.