@HashCodeAndEqualsPlugin.Enhance public class TypeReferenceAdjustment extends AsmVisitorWrapper.AbstractBase
| Modifier and Type | Class and Description | 
|---|---|
protected static class  | 
TypeReferenceAdjustment.TypeReferenceClassVisitor
A class visitor that collects all type references and all inner class references. 
 | 
AsmVisitorWrapper.AbstractBase, AsmVisitorWrapper.Compound, AsmVisitorWrapper.ForDeclaredFields, AsmVisitorWrapper.ForDeclaredMethods, AsmVisitorWrapper.NoOpNO_FLAGS| Modifier | Constructor and Description | 
|---|---|
protected  | 
TypeReferenceAdjustment(boolean strict,
                       ElementMatcher.Junction<? super TypeDescription> filter)
Creates a type reference adjustment. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
TypeReferenceAdjustment | 
filter(ElementMatcher<? super TypeDescription> filter)
Excludes all matched types from being added as an attribute. 
 | 
static TypeReferenceAdjustment | 
relaxed()
Creates a strict type reference adjustment that ignores type references that cannot be resolved
 in the supplied type pool. 
 | 
static TypeReferenceAdjustment | 
strict()
Creates a strict type reference adjustment that throws an exception if a type reference cannot be resolved
 in the supplied type pool. 
 | 
org.objectweb.asm.ClassVisitor | 
wrap(TypeDescription instrumentedType,
    org.objectweb.asm.ClassVisitor classVisitor,
    Implementation.Context implementationContext,
    TypePool typePool,
    FieldList<FieldDescription.InDefinedShape> fields,
    MethodList<?> methods,
    int writerFlags,
    int readerFlags)
Applies a  
ClassVisitorWrapper to the creation of a DynamicType. | 
mergeReader, mergeWriterprotected TypeReferenceAdjustment(boolean strict,
                                  ElementMatcher.Junction<? super TypeDescription> filter)
strict - true if the visitor should throw an exception if a type reference cannot be located.filter - A filter for excluding types from type reference analysis.public static TypeReferenceAdjustment strict()
public static TypeReferenceAdjustment relaxed()
public TypeReferenceAdjustment filter(ElementMatcher<? super TypeDescription> filter)
filter - A filter for excluding types from the attribute generation.public org.objectweb.asm.ClassVisitor wrap(TypeDescription instrumentedType, org.objectweb.asm.ClassVisitor classVisitor, Implementation.Context implementationContext, TypePool typePool, FieldList<FieldDescription.InDefinedShape> fields, MethodList<?> methods, int writerFlags, int readerFlags)
ClassVisitorWrapper to the creation of a DynamicType.instrumentedType - The instrumented type.classVisitor - A ClassVisitor to become the new primary class visitor to which the created
                              DynamicType is written to.implementationContext - The implementation context of the current instrumentation.typePool - The type pool that was provided for the class creation.fields - The instrumented type's fields.methods - The instrumented type's methods non-ignored declared and virtually inherited methods.writerFlags - The ASM ClassWriter flags to consider.readerFlags - The ASM ClassReader flags to consider.ClassVisitor that usually delegates to the ClassVisitor delivered in the argument.Copyright © 2014–2021. All rights reserved.