| java.lang.Object com.sleepycat.asm.ClassAdapter com.sleepycat.persist.model.BytecodeEnhancer
BytecodeEnhancer | class BytecodeEnhancer extends ClassAdapter (Code) | | An ASM ClassVisitor that examines a class, throws NotPersistentException if
it is not persistent, or enhances it if it is persistent. A class is
persistent if it contains the @Entity or @Persistent annotations. A
resulting enhanced class implements the com.sleepycat.persist.impl.Enhanced
interface.
NotPersistentException is thrown to abort the transformation in order to
avoid making two passes over the class file (one to look for the annotations
and another to enhance the bytecode) or outputing a class that isn't
enhanced. By aborting the transformation as soon as we detect that the
annotations are missing, we make only one partial pass for a non-persistent
class.
author: Mark Hayes |
Method Summary | |
static String | getPrimitiveWrapperClass(int primitiveSort) Returns the wrapper class for a primitive. | static boolean | isSimpleRefType(String className) Returns true if the given class is a primitive wrapper, Date or String. | public void | visit(int version, int access, String name, String sig, String superName, String[] interfaces) | public AnnotationVisitor | visitAnnotation(String desc, boolean visible) | public void | visitEnd() | public FieldVisitor | visitField(int access, String name, String desc, String sig, Object value) | public MethodVisitor | visitMethod(int access, String name, String desc, String sig, String[] exceptions) | public void | visitSource(String source, String debug) |
getPrimitiveWrapperClass | static String getPrimitiveWrapperClass(int primitiveSort)(Code) | | Returns the wrapper class for a primitive.
|
isSimpleRefType | static boolean isSimpleRefType(String className)(Code) | | Returns true if the given class is a primitive wrapper, Date or String.
|
visitEnd | public void visitEnd()(Code) | | |
Methods inherited from com.sleepycat.asm.ClassAdapter | public void visit(int version, int access, String name, String signature, String superName, String[] interfaces)(Code)(Java Doc) public AnnotationVisitor visitAnnotation(String desc, boolean visible)(Code)(Java Doc) public void visitAttribute(Attribute attr)(Code)(Java Doc) public void visitEnd()(Code)(Java Doc) public FieldVisitor visitField(int access, String name, String desc, String signature, Object value)(Code)(Java Doc) public void visitInnerClass(String name, String outerName, String innerName, int access)(Code)(Java Doc) public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions)(Code)(Java Doc) public void visitOuterClass(String owner, String name, String desc)(Code)(Java Doc) public void visitSource(String source, String debug)(Code)(Java Doc)
|
|
|