Class AccessorGenerator

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

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

    Fields
    Modifier and Type Field Description
    protected AccessorInfo info
    Accessor info which describes the accessor
    protected boolean targetIsStatic
    True for static field, false for instance field
  • Constructor Summary

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

    Modifier and Type Method Description
    protected void checkModifiers()  
    protected 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()
    Generate the accessor method
    void validate()
    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 field, false for instance field
  • 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