Class AccessorGenerator

java.lang.Object
org.spongepowered.asm.mixin.gen.AccessorGenerator
Direct Known Subclasses:
AccessorGeneratorField, AccessorGeneratorMethodProxy

public abstract class AccessorGenerator extends Object
Base class for accessor generators
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final AccessorInfo
    Accessor info which describes the accessor
    protected final boolean
    True if the target is in an interface
    protected final boolean
    True for static target, false for instance target
  • Constructor Summary

    Constructors
    Constructor
    Description
    AccessorGenerator(AccessorInfo info, boolean isStatic)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
     
    protected final org.objectweb.asm.tree.MethodNode
    createMethod(int maxLocals, int maxStack)
    Create an empty accessor method based on the source method
    abstract org.objectweb.asm.tree.MethodNode
    Generate the accessor method
    void
    Perform pre-flight checks on the accessor, to ensure it can be generated sanely

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • 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 Details

    • AccessorGenerator

      public AccessorGenerator(AccessorInfo info, boolean isStatic)
  • 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 method
      maxStack - 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