public class EnhancerClassAdapter extends ClassVisitor
Modifier and Type | Field and Description |
---|---|
protected ClassEnhancer |
enhancer
The underlying enhancer.
|
protected boolean |
hasDefaultConstructor
Whether a default constructor is present.
|
protected boolean |
hasDetachedState
Whether the field xxxDetachedState 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.
|
api, cv
Constructor and Description |
---|
EnhancerClassAdapter(ClassVisitor cv,
ClassEnhancer enhancer)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
FieldVisitor |
visitField(int access,
String name,
String desc,
String signature,
Object value)
Method called when a field of the class is visited.
|
MethodVisitor |
visitMethod(int access,
String name,
String desc,
String signature,
String[] exceptions)
Method called when a method of the class is visited.
|
visitAnnotation, visitAttribute, visitInnerClass, visitModule, visitOuterClass, visitSource, visitTypeAnnotation
protected ClassEnhancer enhancer
protected boolean hasDefaultConstructor
protected boolean hasSerialVersionUID
protected boolean hasDetachedState
protected boolean hasWriteObject
protected boolean hasStaticInitialisation
public EnhancerClassAdapter(ClassVisitor cv, ClassEnhancer enhancer)
cv
- The writer visitorenhancer
- ClassEnhancerpublic void visit(int version, int access, String name, String signature, String superName, String[] interfaces)
visit
in class ClassVisitor
version
- Version of this classaccess
- Access for the classname
- name of the classsignature
- Signature of the classsuperName
- Superclass name (if any)interfaces
- Interface(s) implementedpublic FieldVisitor visitField(int access, String name, String desc, String signature, Object value)
visitField
in class ClassVisitor
access
- Access typename
- Name of the fielddesc
- Descriptor of the fieldsignature
- Signature of the fieldvalue
- Value of the fieldpublic MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions)
visitMethod
in class ClassVisitor
access
- Access for the methodname
- Name of the methoddesc
- Descriptorsignature
- Signatureexceptions
- Exceptions that this method is declared to throwpublic void visitEnd()
visitEnd
in class ClassVisitor
Copyright © 2019. All rights reserved.