Package org.spongepowered.asm.mixin.gen
Class AccessorGenerator
- java.lang.Object
-
- org.spongepowered.asm.mixin.gen.AccessorGenerator
-
- Direct Known Subclasses:
AccessorGeneratorField,AccessorGeneratorMethodProxy
public abstract class AccessorGenerator extends java.lang.ObjectBase class for accessor generators
-
-
Field Summary
Fields Modifier and Type Field Description protected AccessorInfoinfoAccessor info which describes the accessorprotected booleantargetIsInterfaceTrue if the target is in an interfaceprotected booleantargetIsStaticTrue for static target, false for instance target
-
Constructor Summary
Constructors Constructor Description AccessorGenerator(AccessorInfo info, boolean isStatic)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidcheckModifiers()protected 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 Detail
-
info
protected final AccessorInfo info
Accessor info which describes the accessor
-
targetIsStatic
protected final boolean targetIsStatic
True for static target, false for instance target
-
targetIsInterface
protected final boolean targetIsInterface
True if the target is in an interface
-
-
Constructor Detail
-
AccessorGenerator
public AccessorGenerator(AccessorInfo info, boolean isStatic)
-
-
Method Detail
-
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
-
-