Package net.bytebuddy.dynamic.scaffold
Class TypeWriter.Default.ForInlining.WithDecorationOnly<V>
java.lang.Object
net.bytebuddy.dynamic.scaffold.TypeWriter.Default<V>
net.bytebuddy.dynamic.scaffold.TypeWriter.Default.ForInlining<V>
net.bytebuddy.dynamic.scaffold.TypeWriter.Default.ForInlining.WithDecorationOnly<V>
- Type Parameters:
V- The best known loaded type for the dynamically created type.
- All Implemented Interfaces:
TypeWriter<V>
- Enclosing class:
TypeWriter.Default.ForInlining<U>
protected static class TypeWriter.Default.ForInlining.WithDecorationOnly<V>
extends TypeWriter.Default.ForInlining<V>
A default type writer that only applies a type decoration.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classA class visitor that decorates an existing type.protected static classA field list that only reads fields lazy to avoid an eager lookup since fields are often not required.Nested classes/interfaces inherited from class net.bytebuddy.dynamic.scaffold.TypeWriter.Default.ForInlining
TypeWriter.Default.ForInlining.ContextRegistry, TypeWriter.Default.ForInlining.RegistryContextClassVisitor, TypeWriter.Default.ForInlining.WithDecorationOnly<V>, TypeWriter.Default.ForInlining.WithFullProcessing<V>Nested classes/interfaces inherited from class net.bytebuddy.dynamic.scaffold.TypeWriter.Default
TypeWriter.Default.ClassDumpAction, TypeWriter.Default.ForCreation<U>, TypeWriter.Default.ForInlining<U>, TypeWriter.Default.SignatureKey, TypeWriter.Default.UnresolvedType, TypeWriter.Default.ValidatingClassVisitorNested classes/interfaces inherited from interface net.bytebuddy.dynamic.scaffold.TypeWriter
TypeWriter.Default<S>, TypeWriter.FieldPool, TypeWriter.MethodPool, TypeWriter.RecordComponentPool -
Field Summary
Fields inherited from class net.bytebuddy.dynamic.scaffold.TypeWriter.Default.ForInlining
classFileLocator, originalTypeFields inherited from class net.bytebuddy.dynamic.scaffold.TypeWriter.Default
annotationRetention, annotationValueFilterFactory, asmVisitorWrapper, auxiliaryTypeNamingStrategy, auxiliaryTypes, classFileVersion, classWriterStrategy, DUMP_FOLDER, fieldPool, fields, implementationContextFactory, instrumentedMethods, instrumentedType, loadedTypeInitializer, methods, recordComponentPool, recordComponents, typeAttributeAppender, typeInitializer, typePool, typeValidationFields inherited from interface net.bytebuddy.dynamic.scaffold.TypeWriter
DUMP_PROPERTY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedWithDecorationOnly(TypeDescription instrumentedType, ClassFileVersion classFileVersion, List<? extends DynamicType> auxiliaryTypes, MethodList<?> methods, TypeAttributeAppender typeAttributeAppender, AsmVisitorWrapper asmVisitorWrapper, AnnotationValueFilter.Factory annotationValueFilterFactory, AnnotationRetention annotationRetention, AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy, Implementation.Context.Factory implementationContextFactory, TypeValidation typeValidation, ClassWriterStrategy classWriterStrategy, TypePool typePool, ClassFileLocator classFileLocator) Creates a new inlining type writer that only applies a decoration. -
Method Summary
Modifier and TypeMethodDescriptionprotected org.objectweb.asm.ClassVisitorwriteTo(org.objectweb.asm.ClassVisitor classVisitor, TypeInitializer typeInitializer, TypeWriter.Default.ForInlining.ContextRegistry contextRegistry, int writerFlags, int readerFlags) Creates a class visitor which weaves all changes and additions on the fly.Methods inherited from class net.bytebuddy.dynamic.scaffold.TypeWriter.Default.ForInlining
create, wrapMethods inherited from class net.bytebuddy.dynamic.scaffold.TypeWriter.Default
forCreation, forDecoration, forRebasing, forRedefinition, make
-
Constructor Details
-
WithDecorationOnly
protected WithDecorationOnly(TypeDescription instrumentedType, ClassFileVersion classFileVersion, List<? extends DynamicType> auxiliaryTypes, MethodList<?> methods, TypeAttributeAppender typeAttributeAppender, AsmVisitorWrapper asmVisitorWrapper, AnnotationValueFilter.Factory annotationValueFilterFactory, AnnotationRetention annotationRetention, AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy, Implementation.Context.Factory implementationContextFactory, TypeValidation typeValidation, ClassWriterStrategy classWriterStrategy, TypePool typePool, ClassFileLocator classFileLocator) Creates a new inlining type writer that only applies a decoration.- Parameters:
instrumentedType- The instrumented type to be created.classFileVersion- The class file specified by the user.auxiliaryTypes- The explicit auxiliary types to add to the created type.methods- The instrumented type's declared and virtually inherited methods.typeAttributeAppender- The type attribute appender to apply onto the instrumented type.asmVisitorWrapper- The ASM visitor wrapper to apply onto the class writer.annotationValueFilterFactory- The annotation value filter factory to apply.annotationRetention- The annotation retention to apply.auxiliaryTypeNamingStrategy- The naming strategy for auxiliary types to apply.implementationContextFactory- The implementation context factory to apply.typeValidation- Determines if a type should be explicitly validated.classWriterStrategy- The class writer strategy to use.typePool- The type pool to use for computing stack map frames, if required.classFileLocator- The class file locator for locating the original type's class file.
-
-
Method Details
-
writeTo
protected org.objectweb.asm.ClassVisitor writeTo(org.objectweb.asm.ClassVisitor classVisitor, TypeInitializer typeInitializer, TypeWriter.Default.ForInlining.ContextRegistry contextRegistry, int writerFlags, int readerFlags) Creates a class visitor which weaves all changes and additions on the fly.- Specified by:
writeToin classTypeWriter.Default.ForInlining<V>- Parameters:
classVisitor- The class visitor to which this entry is to be written to.typeInitializer- The type initializer to apply.contextRegistry- A context registry to register the lazily created implementation context to.writerFlags- The writer flags being used.readerFlags- The reader flags being used.- Returns:
- A class visitor which is capable of applying the changes.
-