|
||||||||||
| 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.JdoClassChecker
public class JdoClassChecker
Visitor used to check the enhancement state of a class. Checks the methods/fields present against what is required for JDO enhancement.
| Field Summary | |
|---|---|
protected boolean |
enhanced
Flag for whether the class is enhanced. |
protected ASMClassEnhancer |
enhancer
Enhancer for the class. |
protected HashSet<ClassField> |
fieldsRequired
Set of fields required to be present for JDO. |
protected static org.datanucleus.util.Localiser |
LOCALISER
Message resource |
protected boolean |
logErrors
Whether to log any errors at error level. |
protected HashSet<ClassMethod> |
methodsRequired
Set of methods required to be present for JDO. |
| Fields inherited from class org.objectweb.asm.ClassVisitor |
|---|
api, cv |
| Constructor Summary | |
|---|---|
JdoClassChecker(ASMClassEnhancer enhancer,
boolean logErrors)
Constructor. |
|
| Method Summary | |
|---|---|
protected boolean |
hasInterface(String[] interfaces,
String intf)
Convenience method to check if a particular interface is present in the list. |
boolean |
isEnhanced()
Accessor for whether the class is considered enhanced. |
protected void |
reportError(String msg)
Convenience method to report an error in the enhancement of this class. |
void |
visit(int version,
int access,
String name,
String signature,
String supername,
String[] interfaces)
Method to visit the header of the class |
org.objectweb.asm.AnnotationVisitor |
visitAnnotation(String desc,
boolean visible)
Method to visit a class annotations |
void |
visitAttribute(org.objectweb.asm.Attribute attr)
Method to visit a non-standard attribute |
void |
visitEnd()
Visit the end of the class |
org.objectweb.asm.FieldVisitor |
visitField(int access,
String name,
String desc,
String signature,
Object value)
Visit a field of the class. |
void |
visitInnerClass(String name,
String outerName,
String innerName,
int access)
Visit an inner class of the class |
org.objectweb.asm.MethodVisitor |
visitMethod(int access,
String name,
String desc,
String signature,
String[] exceptions)
Visit a method of the class |
void |
visitOuterClass(String owner,
String name,
String desc)
Visit an outer class. |
void |
visitSource(String source,
String debug)
Visit the source of the class |
| 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 HashSet<ClassField> fieldsRequired
protected HashSet<ClassMethod> methodsRequired
protected boolean enhanced
protected boolean logErrors
| Constructor Detail |
|---|
public JdoClassChecker(ASMClassEnhancer enhancer,
boolean logErrors)
enhancer - The class enhancerlogErrors - Whether to log any errors at error level| Method Detail |
|---|
public boolean isEnhanced()
protected void reportError(String msg)
msg - The message
public void visit(int version,
int access,
String name,
String signature,
String supername,
String[] interfaces)
visit in class org.objectweb.asm.ClassVisitorversion - Version of the class fileaccess - Access typename - name of the classsignature - signature of the classsupername - superclass nameinterfaces - interface(s)
protected boolean hasInterface(String[] interfaces,
String intf)
interfaces - The list of interfaces implementedintf - The interface we are looking for
public org.objectweb.asm.AnnotationVisitor visitAnnotation(String desc,
boolean visible)
visitAnnotation in class org.objectweb.asm.ClassVisitordesc - descriptor of the annotationvisible - Whether visible
public void visitAttribute(org.objectweb.asm.Attribute attr)
visitAttribute in class org.objectweb.asm.ClassVisitorattr - the attributepublic void visitEnd()
visitEnd in class org.objectweb.asm.ClassVisitor
public org.objectweb.asm.FieldVisitor visitField(int access,
String name,
String desc,
String signature,
Object value)
visitField in class org.objectweb.asm.ClassVisitoraccess - Access for the fieldname - name of the fielddesc - Descriptor of the fieldsignature - signature of the fieldvalue - initial value
public void visitInnerClass(String name,
String outerName,
String innerName,
int access)
visitInnerClass in class org.objectweb.asm.ClassVisitorname - Internal name of the classouterName - name of the outer classinnerName - name of the inner classaccess - access of the inner class
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 fieldname - name of the fielddesc - Descriptor of the fieldsignature - signature of the fieldexceptions - Exceptions thrown
public void visitOuterClass(String owner,
String name,
String desc)
visitOuterClass in class org.objectweb.asm.ClassVisitorowner - owner for the outer classname - name of the outer classdesc - Descriptor of the outer class
public void visitSource(String source,
String debug)
visitSource in class org.objectweb.asm.ClassVisitorsource - name of source filedebug - debug info
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||