protected class TypeWriter.Default.ForInlining.RedefinitionClassVisitor extends ClassVisitor
Modifier and Type | Class and Description |
---|---|
protected class |
TypeWriter.Default.ForInlining.RedefinitionClassVisitor.AttributeObtainingMethodVisitor
A method visitor that obtains all attributes and annotations of a method that is found in the
class file but discards all code.
|
protected class |
TypeWriter.Default.ForInlining.RedefinitionClassVisitor.CodePreservingMethodVisitor
A method visitor that preserves the code of a method in the class file by copying it into a rebased
method while copying all attributes and annotations to the actual method.
|
protected class |
TypeWriter.Default.ForInlining.RedefinitionClassVisitor.TypeInitializerInjection
A code injection for the type initializer that invokes a method representing the original type initializer
which is copied to a static method.
|
api, cv
Modifier | Constructor and Description |
---|---|
protected |
RedefinitionClassVisitor(ClassVisitor classVisitor,
Implementation.Context.ExtractableView implementationContext)
Creates a class visitor which is capable of redefining an existent class on the fly.
|
Modifier and Type | Method and Description |
---|---|
protected MethodVisitor |
redefine(MethodDescription methodDescription,
boolean abstractOrigin)
Redefines a given method if this is required by looking up a potential implementation from the
TypeWriter.MethodPool . |
String |
toString() |
void |
visit(int classFileVersionNumber,
int modifiers,
String internalName,
String genericSignature,
String superTypeInternalName,
String[] interfaceTypeInternalName) |
void |
visitEnd() |
FieldVisitor |
visitField(int modifiers,
String internalName,
String descriptor,
String genericSignature,
Object defaultValue) |
MethodVisitor |
visitMethod(int modifiers,
String internalName,
String descriptor,
String genericSignature,
String[] exceptionTypeInternalName) |
visitAnnotation, visitAttribute, visitInnerClass, visitOuterClass, visitSource, visitTypeAnnotation
protected RedefinitionClassVisitor(ClassVisitor classVisitor, Implementation.Context.ExtractableView implementationContext)
classVisitor
- The underlying class visitor to which writes are delegated.implementationContext
- The implementation context to use for implementing the class file.public void visit(int classFileVersionNumber, int modifiers, String internalName, String genericSignature, String superTypeInternalName, String[] interfaceTypeInternalName)
visit
in class ClassVisitor
public FieldVisitor visitField(int modifiers, String internalName, String descriptor, String genericSignature, Object defaultValue)
visitField
in class ClassVisitor
public MethodVisitor visitMethod(int modifiers, String internalName, String descriptor, String genericSignature, String[] exceptionTypeInternalName)
visitMethod
in class ClassVisitor
protected MethodVisitor redefine(MethodDescription methodDescription, boolean abstractOrigin)
TypeWriter.MethodPool
.methodDescription
- The method being considered for redefinition.abstractOrigin
- true
if the original method is abstract, i.e. there is no implementation
to preserve.public void visitEnd()
visitEnd
in class ClassVisitor
Copyright © 2014–2015. All rights reserved.