public abstract static class TypeWriter.Default.ForInlining.WithFullProcessing.InitializationHandler.Appending extends ExceptionTableSensitiveMethodVisitor implements TypeWriter.Default.ForInlining.WithFullProcessing.InitializationHandler, TypeInitializer.Drain
| Modifier and Type | Class and Description |
|---|---|
protected static interface |
TypeWriter.Default.ForInlining.WithFullProcessing.InitializationHandler.Appending.FrameWriter
A frame writer is responsible for adding empty frames on jump instructions.
|
protected static class |
TypeWriter.Default.ForInlining.WithFullProcessing.InitializationHandler.Appending.WithDrain
An initialization handler that appends code to a previously visited type initializer with allowing active
TypeInitializer registrations. |
protected static class |
TypeWriter.Default.ForInlining.WithFullProcessing.InitializationHandler.Appending.WithoutDrain
An initialization handler that appends code to a previously visited type initializer without allowing active
TypeInitializer registrations. |
TypeWriter.Default.ForInlining.WithFullProcessing.InitializationHandler.Appending, TypeWriter.Default.ForInlining.WithFullProcessing.InitializationHandler.CreatingTypeInitializer.Drain.Default| Modifier and Type | Field and Description |
|---|---|
protected AnnotationValueFilter.Factory |
annotationValueFilterFactory
The used annotation value filter factory.
|
protected TypeWriter.Default.ForInlining.WithFullProcessing.InitializationHandler.Appending.FrameWriter |
frameWriter
The frame writer to use.
|
protected TypeDescription |
instrumentedType
The instrumented type.
|
protected int |
localVariableLength
The currently recorded local variable length.
|
protected TypeWriter.MethodPool.Record |
record
The method pool record for the type initializer.
|
protected int |
stackSize
The currently recorded stack size.
|
api, mv| Modifier | Constructor and Description |
|---|---|
protected |
Appending(MethodVisitor methodVisitor,
TypeDescription instrumentedType,
TypeWriter.MethodPool.Record record,
AnnotationValueFilter.Factory annotationValueFilterFactory,
boolean requireFrames,
boolean expandFrames)
Creates a new appending initialization handler.
|
| Modifier and Type | Method and Description |
|---|---|
void |
apply(ClassVisitor classVisitor,
TypeInitializer typeInitializer,
Implementation.Context implementationContext)
Applies the drain.
|
void |
complete(ClassVisitor classVisitor,
Implementation.Context.ExtractableView implementationContext)
Invoked upon completion of writing the instrumented type.
|
protected static TypeWriter.Default.ForInlining.WithFullProcessing.InitializationHandler |
of(boolean enabled,
MethodVisitor methodVisitor,
TypeDescription instrumentedType,
TypeWriter.MethodPool methodPool,
AnnotationValueFilter.Factory annotationValueFilterFactory,
boolean requireFrames,
boolean expandFrames)
Resolves an initialization handler.
|
protected void |
onAfterExceptionTable()
Invoked after the exception table was visited.
|
protected abstract void |
onComplete(Implementation.Context implementationContext)
Invoked upon completion of writing the type initializer.
|
protected abstract void |
onStart()
Invoked after the user code was visited.
|
protected void |
onVisitFrame(int type,
int localVariableLength,
Object[] localVariable,
int stackSize,
Object[] stack)
Visits a stack map frame.
|
void |
visitCode() |
abstract void |
visitEnd() |
void |
visitMaxs(int stackSize,
int localVariableLength) |
onVisitFieldInsn, onVisitIincInsn, onVisitInsn, onVisitIntInsn, onVisitInvokeDynamicInsn, onVisitJumpInsn, onVisitLabel, onVisitLdcInsn, onVisitLookupSwitchInsn, onVisitMethodInsn, onVisitMethodInsn, onVisitMultiANewArrayInsn, onVisitTableSwitchInsn, onVisitTypeInsn, onVisitVarInsn, visitFieldInsn, visitFrame, visitIincInsn, visitInsn, visitIntInsn, visitInvokeDynamicInsn, visitJumpInsn, visitLabel, visitLdcInsn, visitLookupSwitchInsn, visitMethodInsn, visitMethodInsn, visitMultiANewArrayInsn, visitTableSwitchInsn, visitTypeInsn, visitVarInsngetDelegate, visitAnnotableParameterCount, visitAnnotation, visitAnnotationDefault, visitAttribute, visitInsnAnnotation, visitLineNumber, visitLocalVariable, visitLocalVariableAnnotation, visitParameter, visitParameterAnnotation, visitTryCatchAnnotation, visitTryCatchBlock, visitTypeAnnotationprotected final TypeDescription instrumentedType
protected final TypeWriter.MethodPool.Record record
protected final AnnotationValueFilter.Factory annotationValueFilterFactory
protected final TypeWriter.Default.ForInlining.WithFullProcessing.InitializationHandler.Appending.FrameWriter frameWriter
protected int stackSize
protected int localVariableLength
protected Appending(MethodVisitor methodVisitor, TypeDescription instrumentedType, TypeWriter.MethodPool.Record record, AnnotationValueFilter.Factory annotationValueFilterFactory, boolean requireFrames, boolean expandFrames)
methodVisitor - The underlying method visitor.instrumentedType - The instrumented type.record - The method pool record for the type initializer.annotationValueFilterFactory - The used annotation value filter factory.requireFrames - true if the visitor is required to add frames.expandFrames - true if the visitor is required to expand any added frame.protected static TypeWriter.Default.ForInlining.WithFullProcessing.InitializationHandler of(boolean enabled, MethodVisitor methodVisitor, TypeDescription instrumentedType, TypeWriter.MethodPool methodPool, AnnotationValueFilter.Factory annotationValueFilterFactory, boolean requireFrames, boolean expandFrames)
enabled - true if the implementation context is enabled, i.e. any TypeInitializer might be active.methodVisitor - The delegation method visitor.instrumentedType - The instrumented type.methodPool - The method pool to use.annotationValueFilterFactory - The annotation value filter factory to use.requireFrames - true if frames must be computed.expandFrames - true if frames must be expanded.MethodVisitor.public void visitCode()
visitCode in class MethodVisitorprotected void onAfterExceptionTable()
ExceptionTableSensitiveMethodVisitoronAfterExceptionTable in class ExceptionTableSensitiveMethodVisitorprotected abstract void onStart()
protected void onVisitFrame(int type,
int localVariableLength,
@MaybeNull
Object[] localVariable,
int stackSize,
@MaybeNull
Object[] stack)
ExceptionTableSensitiveMethodVisitoronVisitFrame in class ExceptionTableSensitiveMethodVisitortype - The type of stack map frame.localVariableLength - The length of the local variable array.localVariable - An array containing type symbols for all values in the local variable array or null if none.stackSize - The size of the operand stack.stack - An array containing type symbols for all values on the operand stack or null if none.public void visitMaxs(int stackSize,
int localVariableLength)
visitMaxs in class MethodVisitorpublic abstract void visitEnd()
visitEnd in class MethodVisitorpublic void apply(ClassVisitor classVisitor, TypeInitializer typeInitializer, Implementation.Context implementationContext)
apply in interface TypeInitializer.DrainclassVisitor - The class visitor to apply the initializer to.typeInitializer - The type initializer to write.implementationContext - The corresponding implementation context.protected abstract void onComplete(Implementation.Context implementationContext)
implementationContext - The implementation context to use.public void complete(ClassVisitor classVisitor, Implementation.Context.ExtractableView implementationContext)
complete in interface TypeWriter.Default.ForInlining.WithFullProcessing.InitializationHandlerclassVisitor - The class visitor to write any methods to.implementationContext - The implementation context to use.Copyright © 2014–2026. All rights reserved.