|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.objectweb.asm.ClassVisitor
org.datanucleus.enhancer.asm.JdoClassAdapter
public class JdoClassAdapter
Adapter visitor class for providing enhancement of an existing class using ASM. Is created with its own ClassWriter, and is passed to a ClassReader to visit the class. All parts of the class to be enhanced are fed through the different visitXXX methods here allowing intervention to either enhance an existing method, or to add on new fields/methods/interfaces.
| Field Summary | |
|---|---|
protected ASMClassEnhancer |
enhancer
The underlying enhancer. |
protected boolean |
hasDefaultConstructor
Whether a default constructor is present. |
protected boolean |
hasJdoDetachedState
Whether the field jdoDetachedState is present. |
protected boolean |
hasSerialVersionUID
Whether the field serialVersionUID is present. |
protected boolean |
hasStaticInitialisation
Whether the class already has a static init block. |
protected boolean |
hasWriteObject
Whether the method writeObject(ObjectOutputStream) is present. |
protected static org.datanucleus.util.Localiser |
LOCALISER
Localisation of messages |
| Fields inherited from class org.objectweb.asm.ClassVisitor |
|---|
api, cv |
| Constructor Summary | |
|---|---|
JdoClassAdapter(org.objectweb.asm.ClassVisitor cv,
ASMClassEnhancer enhancer)
Constructor. |
|
| Method Summary | |
|---|---|
void |
visit(int version,
int access,
String name,
String signature,
String superName,
String[] interfaces)
Method called to visit the header of the class. |
void |
visitEnd()
Method called at the end of the class. |
org.objectweb.asm.FieldVisitor |
visitField(int access,
String name,
String desc,
String signature,
Object value)
Method called when a field of the class is visited. |
org.objectweb.asm.MethodVisitor |
visitMethod(int access,
String name,
String desc,
String signature,
String[] exceptions)
Method called when a method of the class is visited. |
| Methods inherited from class org.objectweb.asm.ClassVisitor |
|---|
visitAnnotation, visitAttribute, visitInnerClass, visitOuterClass, visitSource |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.datanucleus.util.Localiser LOCALISER
protected ASMClassEnhancer enhancer
protected boolean hasDefaultConstructor
protected boolean hasSerialVersionUID
protected boolean hasJdoDetachedState
protected boolean hasWriteObject
protected boolean hasStaticInitialisation
| Constructor Detail |
|---|
public JdoClassAdapter(org.objectweb.asm.ClassVisitor cv,
ASMClassEnhancer enhancer)
cv - The writer visitor| Method Detail |
|---|
public void visit(int version,
int access,
String name,
String signature,
String superName,
String[] interfaces)
visit in class org.objectweb.asm.ClassVisitorversion - Version of this classaccess - Access for the classname - name of the classsignature - Signature of the classsuperName - Superclass name (if any)interfaces - Interface(s) implemented
public org.objectweb.asm.FieldVisitor visitField(int access,
String name,
String desc,
String signature,
Object value)
visitField in class org.objectweb.asm.ClassVisitoraccess - Access typename - Name of the fielddesc - Descriptor of the fieldsignature - Signature of the fieldvalue - Value of the field
public org.objectweb.asm.MethodVisitor visitMethod(int access,
String name,
String desc,
String signature,
String[] exceptions)
visitMethod in class org.objectweb.asm.ClassVisitoraccess - Access for the methodname - Name of the methoddesc - Descriptorsignature - Signatureexceptions - Exceptions that this method is declared to throw
public void visitEnd()
visitEnd in class org.objectweb.asm.ClassVisitor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||