Class AddMethodAccessorMethods

java.lang.Object
dev.morphia.critter.parser.asm.BaseGenerator
dev.morphia.critter.parser.asm.AddMethodAccessorMethods

public class AddMethodAccessorMethods extends BaseGenerator
Generates synthetic __readXxx and __writeXxx accessor methods into an entity class bytecode for properties backed by getter/setter methods rather than direct fields.
  • Constructor Details

    • AddMethodAccessorMethods

      public AddMethodAccessorMethods(Class<?> entity, List<org.objectweb.asm.tree.MethodNode> methods)
      Creates a generator that will add accessor methods for the given getter methods to the entity class.
      Parameters:
      entity - the entity class to augment
      methods - the getter methods for which accessor methods should be generated
  • Method Details

    • emit

      public byte[] emit()
      Description copied from class: BaseGenerator
      Emits the generated or augmented class bytecode.
      Specified by:
      emit in class BaseGenerator
      Returns:
      the bytecode of the generated class