T - The type of the mapped class visitor.@HashCodeAndEqualsPlugin.Enhance public abstract class ClassVisitorFactory<T> extends Object
ClassVisitor in Byte Buddy's package namespace to a
 ClassVisitor in any other namespace. Note that this API does not allow for the
 passing of Attributes. which must be filtered or propagated past this translation.
 If the supplied visitors do not declare a method that Byte Buddy's version of ASM is aware
 of, an UnsupportedOperationException is thrown.| Modifier and Type | Class and Description | 
|---|---|
| protected static class  | ClassVisitorFactory.AttributeTranslatorA method to wrap an  Attribute. | 
| protected static class  | ClassVisitorFactory.ConstantArrayTranslatorA method to translate an array of constants from one namespace to another. | 
| protected static class  | ClassVisitorFactory.ConstantDynamicTranslatorA method to translate a  ConstantDynamicfrom one namespace to another. | 
| protected static class  | ClassVisitorFactory.ConstantTranslatorA method to translate a constant value from one namespace to another. | 
| protected static class  | ClassVisitorFactory.CreateClassVisitorFactory<S>A factory for creating a wrapper for a  ClassVisitor. | 
| protected static class  | ClassVisitorFactory.FrameTranslatorA method to translate a stack map frame array from one namespace to another. | 
| protected static class  | ClassVisitorFactory.HandleTranslatorA method to translate a  Handlefrom one namespace to another. | 
| protected static class  | ClassVisitorFactory.LabelArrayTranslatorA method to translate an array of  Labels from one namespace to another. | 
| protected static class  | ClassVisitorFactory.LabelTranslatorA method to translate a  Labelfrom one namespace to another. | 
| protected static class  | ClassVisitorFactory.NullCheckedConstructionAn appender that performs a  null-checked construction. | 
| protected static class  | ClassVisitorFactory.TypePathTranslatorA method to translate a  TypePathtype from one namespace to another. | 
| Modifier | Constructor and Description | 
|---|---|
| protected  | ClassVisitorFactory(Class<?> type)Creates a new factory. | 
| Modifier and Type | Method and Description | 
|---|---|
| Class<?> | getType()Returns the  ClassVisitortype that this factory represents. | 
| static <S> ClassVisitorFactory<S> | of(Class<S> classVisitor)Returns a class visitor factory for the supplied  ClassVisitortype. | 
| static <S> ClassVisitorFactory<S> | of(Class<S> classVisitor,
  ByteBuddy byteBuddy)Returns a class visitor factory for the supplied  ClassVisitortype. | 
| abstract ClassVisitor | unwrap(T classVisitor)Unwraps an instance of the supplied class visitor as a  ClassVisitor. | 
| abstract T | wrap(ClassVisitor classVisitor)Wraps a  ClassVisitorwithin an instance of the supplied class visitor type. | 
protected ClassVisitorFactory(Class<?> type)
type - The type of the represented class visitor wrapper.public Class<?> getType()
ClassVisitor type that this factory represents.ClassVisitor type that this factory represents.public static <S> ClassVisitorFactory<S> of(Class<S> classVisitor)
ClassVisitor type.S - The type of the class visitor to map to.classVisitor - The type of the translated class visitor.ClassVisitors in Byte Buddy's and the supplied package namespace.public static <S> ClassVisitorFactory<S> of(Class<S> classVisitor, ByteBuddy byteBuddy)
ClassVisitor type.S - The type of the class visitor to map to.classVisitor - The type of the translated ClassVisitor.byteBuddy - The Byte Buddy instance to use.ClassVisitors in Byte Buddy's and the supplied package namespace.public abstract T wrap(ClassVisitor classVisitor)
ClassVisitor within an instance of the supplied class visitor type.classVisitor - The class visitor to wrap.public abstract ClassVisitor unwrap(T classVisitor)
ClassVisitor.classVisitor - The class visitor to unwrap.Copyright © 2014–2025. All rights reserved.