Package dev.morphia.critter.parser.asm
Class AddMethodAccessorMethods
java.lang.Object
dev.morphia.critter.parser.asm.BaseGenerator
dev.morphia.critter.parser.asm.AddMethodAccessorMethods
Generates synthetic
__readXxx and __writeXxx accessor methods into an entity class
bytecode for properties backed by getter/setter methods rather than direct fields.-
Field Summary
Fields inherited from class dev.morphia.critter.parser.asm.BaseGenerator
classWriter, entityType, generatedType, lineNumber -
Constructor Summary
ConstructorsConstructorDescriptionAddMethodAccessorMethods(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. -
Method Summary
Methods inherited from class dev.morphia.critter.parser.asm.BaseGenerator
accessFlags, label, label, label, labelNoVisit, method, readClassFiltering
-
Constructor Details
-
AddMethodAccessorMethods
Creates a generator that will add accessor methods for the given getter methods to the entity class.- Parameters:
entity- the entity class to augmentmethods- the getter methods for which accessor methods should be generated
-
-
Method Details
-
emit
public byte[] emit()Description copied from class:BaseGeneratorEmits the generated or augmented class bytecode.- Specified by:
emitin classBaseGenerator- Returns:
- the bytecode of the generated class
-