Package net.bytebuddy.dynamic.scaffold
Class TypeWriter.Default.ForInlining.InitializationHandler.Appending.WithDrain
- java.lang.Object
-
- org.objectweb.asm.MethodVisitor
-
- net.bytebuddy.dynamic.scaffold.TypeWriter.Default.ForInlining.InitializationHandler.Appending
-
- net.bytebuddy.dynamic.scaffold.TypeWriter.Default.ForInlining.InitializationHandler.Appending.WithDrain
-
- All Implemented Interfaces:
TypeInitializer.Drain
,TypeWriter.Default.ForInlining.InitializationHandler
- Direct Known Subclasses:
TypeWriter.Default.ForInlining.InitializationHandler.Appending.WithDrain.WithActiveRecord
,TypeWriter.Default.ForInlining.InitializationHandler.Appending.WithDrain.WithoutActiveRecord
- Enclosing class:
- TypeWriter.Default.ForInlining.InitializationHandler.Appending
protected abstract static class TypeWriter.Default.ForInlining.InitializationHandler.Appending.WithDrain extends TypeWriter.Default.ForInlining.InitializationHandler.Appending
An initialization handler that appends code to a previously visited type initializer with allowing activeTypeInitializer
registrations.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
TypeWriter.Default.ForInlining.InitializationHandler.Appending.WithDrain.WithActiveRecord
A code appending initialization handler with a drain that applies an explicit record.protected static class
TypeWriter.Default.ForInlining.InitializationHandler.Appending.WithDrain.WithoutActiveRecord
A code appending initialization handler with a drain that does not apply an explicit record.-
Nested classes/interfaces inherited from class net.bytebuddy.dynamic.scaffold.TypeWriter.Default.ForInlining.InitializationHandler.Appending
TypeWriter.Default.ForInlining.InitializationHandler.Appending.FrameWriter, TypeWriter.Default.ForInlining.InitializationHandler.Appending.WithDrain, TypeWriter.Default.ForInlining.InitializationHandler.Appending.WithoutDrain
-
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.scaffold.TypeInitializer.Drain
TypeInitializer.Drain.Default
-
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.scaffold.TypeWriter.Default.ForInlining.InitializationHandler
TypeWriter.Default.ForInlining.InitializationHandler.Appending, TypeWriter.Default.ForInlining.InitializationHandler.Creating
-
-
Field Summary
Fields Modifier and Type Field Description protected org.objectweb.asm.Label
appended
A label marking the beginning of the appended code.protected org.objectweb.asm.Label
original
A label marking the beginning og the original type initializer's code.-
Fields inherited from class net.bytebuddy.dynamic.scaffold.TypeWriter.Default.ForInlining.InitializationHandler.Appending
annotationValueFilterFactory, frameWriter, instrumentedType, localVariableLength, record, stackSize
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
WithDrain(org.objectweb.asm.MethodVisitor methodVisitor, TypeDescription instrumentedType, TypeWriter.MethodPool.Record record, AnnotationValueFilter.Factory annotationValueFilterFactory, boolean requireFrames, boolean expandFrames)
Creates a new appending initialization handler with a drain.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
afterComplete(Implementation.Context implementationContext)
Invoked after completion of writing the type initializer.protected void
onComplete(Implementation.Context implementationContext)
Invoked upon completion of writing the type initializer.protected void
onEnd()
Invoked after the user code was completed.protected void
onStart()
Invoked after the user code was visited.-
Methods inherited from class net.bytebuddy.dynamic.scaffold.TypeWriter.Default.ForInlining.InitializationHandler.Appending
apply, complete, of, visitCode, visitEnd, visitFrame, visitMaxs
-
Methods inherited from class org.objectweb.asm.MethodVisitor
visitAnnotableParameterCount, visitAnnotation, visitAnnotationDefault, visitAttribute, visitFieldInsn, visitIincInsn, visitInsn, visitInsnAnnotation, visitIntInsn, visitInvokeDynamicInsn, visitJumpInsn, visitLabel, visitLdcInsn, visitLineNumber, visitLocalVariable, visitLocalVariableAnnotation, visitLookupSwitchInsn, visitMethodInsn, visitMethodInsn, visitMultiANewArrayInsn, visitParameter, visitParameterAnnotation, visitTableSwitchInsn, visitTryCatchAnnotation, visitTryCatchBlock, visitTypeAnnotation, visitTypeInsn, visitVarInsn
-
-
-
-
Constructor Detail
-
WithDrain
protected WithDrain(org.objectweb.asm.MethodVisitor methodVisitor, TypeDescription instrumentedType, TypeWriter.MethodPool.Record record, AnnotationValueFilter.Factory annotationValueFilterFactory, boolean requireFrames, boolean expandFrames)
Creates a new appending initialization handler with a drain.- Parameters:
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.
-
-
Method Detail
-
onStart
protected void onStart()
Description copied from class:TypeWriter.Default.ForInlining.InitializationHandler.Appending
Invoked after the user code was visited.- Specified by:
onStart
in classTypeWriter.Default.ForInlining.InitializationHandler.Appending
-
onEnd
protected void onEnd()
Description copied from class:TypeWriter.Default.ForInlining.InitializationHandler.Appending
Invoked after the user code was completed.- Specified by:
onEnd
in classTypeWriter.Default.ForInlining.InitializationHandler.Appending
-
onComplete
protected void onComplete(Implementation.Context implementationContext)
Description copied from class:TypeWriter.Default.ForInlining.InitializationHandler.Appending
Invoked upon completion of writing the type initializer.- Specified by:
onComplete
in classTypeWriter.Default.ForInlining.InitializationHandler.Appending
- Parameters:
implementationContext
- The implementation context to use.
-
afterComplete
protected abstract void afterComplete(Implementation.Context implementationContext)
Invoked after completion of writing the type initializer.- Parameters:
implementationContext
- The implementation context to use.
-
-