Package org.spongepowered.asm.mixin.gen
Class AccessorGenerator
java.lang.Object
org.spongepowered.asm.mixin.gen.AccessorGenerator
- Direct Known Subclasses:
AccessorGeneratorField,AccessorGeneratorMethodProxy
Base class for accessor generators
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final AccessorInfoAccessor info which describes the accessorprotected final booleanTrue if the target is in an interfaceprotected final booleanTrue for static target, false for instance target -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected final org.objectweb.asm.tree.MethodNodecreateMethod(int maxLocals, int maxStack) Create an empty accessor method based on the source methodabstract org.objectweb.asm.tree.MethodNodegenerate()Generate the accessor methodvoidvalidate()Perform pre-flight checks on the accessor, to ensure it can be generated sanely
-
Field Details
-
info
Accessor info which describes the accessor -
targetIsStatic
protected final boolean targetIsStaticTrue for static target, false for instance target -
targetIsInterface
protected final boolean targetIsInterfaceTrue if the target is in an interface
-
-
Constructor Details
-
AccessorGenerator
-
-
Method Details
-
checkModifiers
protected void checkModifiers() -
createMethod
protected final org.objectweb.asm.tree.MethodNode createMethod(int maxLocals, int maxStack) Create an empty accessor method based on the source method- Parameters:
maxLocals- max locals size for methodmaxStack- max stack size for method- Returns:
- new method
-
validate
public void validate()Perform pre-flight checks on the accessor, to ensure it can be generated sanely -
generate
public abstract org.objectweb.asm.tree.MethodNode generate()Generate the accessor method- Returns:
- generated accessor method
-