public final class ArgsClassGenerator extends java.lang.Object implements IClassGenerator
Args to be used by the
ModifyArgs injector. The subclasses contain getter and setter logic
to provide access to a particular configuration of arguments and classes are
only generated for each unique argument combination.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ARGS_NAME |
static java.lang.String |
ARGS_REF |
static java.lang.String |
GETTER_PREFIX |
| Constructor and Description |
|---|
ArgsClassGenerator(IConsumer<ISyntheticClassInfo> registry)
Ctor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
generate(java.lang.String name,
org.objectweb.asm.tree.ClassNode classNode)
Generate (if possible) the specified class name.
|
ISyntheticClassInfo |
getArgsClass(java.lang.String desc,
IMixinInfo mixin)
Get (or generate) the class name for the specified descriptor.
|
java.lang.String |
getName()
Get the name of this generator for logging and auditing purposes
|
public static final java.lang.String ARGS_NAME
public static final java.lang.String ARGS_REF
public static final java.lang.String GETTER_PREFIX
public ArgsClassGenerator(IConsumer<ISyntheticClassInfo> registry)
registry - sythetic class registrypublic java.lang.String getName()
IClassGeneratorgetName in interface IClassGeneratorpublic ISyntheticClassInfo getArgsClass(java.lang.String desc, IMixinInfo mixin)
desc - Descriptor of the target method, the return type is
ignored for the purposes of generating Args subclassesmixin - Mixin which requires the class. Only the first mixin to
request a class will be registered against it but this is for
debugging only anywaypublic boolean generate(java.lang.String name,
org.objectweb.asm.tree.ClassNode classNode)
IClassGeneratorgenerate in interface IClassGeneratorname - Class name to generateclassNode - Empty ClassNode to populate