Package org.hibernate.bytecode.buildtime
Class JavassistInstrumenter
java.lang.Object
org.hibernate.bytecode.buildtime.AbstractInstrumenter
org.hibernate.bytecode.buildtime.JavassistInstrumenter
- All Implemented Interfaces:
Instrumenter
Strategy for performing build-time instrumentation of persistent classes in order to enable
field-level interception using Javassist.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.hibernate.bytecode.buildtime.AbstractInstrumenter
AbstractInstrumenter.CustomFieldFilterNested classes/interfaces inherited from interface org.hibernate.bytecode.buildtime.Instrumenter
Instrumenter.Options -
Field Summary
Fields inherited from class org.hibernate.bytecode.buildtime.AbstractInstrumenter
logger, options -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ClassDescriptorgetClassDescriptor(byte[] bytecode) Given the bytecode of a java class, retrieve the descriptor for that class.protected ClassTransformergetClassTransformer(ClassDescriptor descriptor, Set classNames) Create class transformer for the class.Methods inherited from class org.hibernate.bytecode.buildtime.AbstractInstrumenter
checkMagic, execute, isClassFile, isJarFile, processClassFile, processFile, processJarFile
-
Constructor Details
-
JavassistInstrumenter
-
-
Method Details
-
getClassDescriptor
Description copied from class:AbstractInstrumenterGiven the bytecode of a java class, retrieve the descriptor for that class.- Specified by:
getClassDescriptorin classAbstractInstrumenter- Parameters:
bytecode- The class bytecode.- Returns:
- The class's descriptor
- Throws:
IOException
-
getClassTransformer
Description copied from class:AbstractInstrumenterCreate class transformer for the class.- Specified by:
getClassTransformerin classAbstractInstrumenter- Parameters:
descriptor- The descriptor of the class to be instrumented.classNames- The names of all classes to be instrumented; the "pipeline" if you will.- Returns:
- The transformer for the given class; may return null to indicate that transformation should be skipped (ala already instrumented).
-