Modifier and Type | Field and Description |
---|---|
private final AnnotationRetention | annotationRetention
The annotation retention to apply. |
private final AnnotationValueFilter. | annotationValueFilterFactory
The annotation value filter factory to apply. |
private final AsmVisitorWrapper | asmVisitorWrapper
The ASM visitor wrapper to apply onto the class writer. |
private final AuxiliaryType. | auxiliaryTypeNamingStrategy
The naming strategy for auxiliary types to apply. |
private final List | auxiliaryTypes
A list of explicitly required auxiliary types. |
private final ClassFileLocator | classFileLocator
The class file locator for locating the original type's class file. |
private final ClassFileVersion | classFileVersion
The class file version to define auxiliary types in. |
private final ClassWriterStrategy | classWriterStrategy
The class writer strategy to use. |
private final LatentMatcher | ignoredMethods
A matcher for identifying methods that should be excluded from instrumentation. |
private final Implementation. | implementationContextFactory
The implementation context factory to apply. |
private final TypeDescription | instrumentedType
The instrumented type to decorate. |
private final MethodGraph. | methodGraphCompiler
The method graph compiler to use. |
private final TypeAttributeAppender | typeAttributeAppender
The type attribute appender to apply onto the instrumented type. |
private final TypeValidation | typeValidation
Determines if a type should be explicitly validated. |
Access | Constructor and Description |
---|---|
public | DecoratingDynamicTypeBuilder(TypeDescription
The instrumented type to decorate. instrumentedType, ClassFileVersion The class file version to define auxiliary types in. classFileVersion, AuxiliaryType.The naming strategy for auxiliary types to apply. auxiliaryTypeNamingStrategy,The annotation value filter factory to apply. annotationValueFilterFactory,The annotation retention to apply. annotationRetention, Implementation.The implementation context factory to apply. implementationContextFactory,The method graph compiler to use. methodGraphCompiler,Determines if a type should be explicitly validated. typeValidation, ClassWriterStrategy The class writer strategy to use. classWriterStrategy, LatentMatcher<? super MethodDescription> A matcher for identifying methods that should be excluded from instrumentation. ignoredMethods, ClassFileLocator The class file locator for locating the original type's class file. classFileLocator)Creates a new decorating dynamic type builder. |
protected | DecoratingDynamicTypeBuilder(TypeDescription
The instrumented type to decorate. instrumentedType, TypeAttributeAppender The type attribute appender to apply onto the instrumented type. typeAttributeAppender, AsmVisitorWrapper The ASM visitor wrapper to apply onto the class writer. asmVisitorWrapper, ClassFileVersion The class file version to define auxiliary types in. classFileVersion, AuxiliaryType.The naming strategy for auxiliary types to apply. auxiliaryTypeNamingStrategy,The annotation value filter factory to apply. annotationValueFilterFactory,The annotation retention to apply. annotationRetention, Implementation.The implementation context factory to apply. implementationContextFactory,The method graph compiler to use. methodGraphCompiler,Determines if a type should be explicitly validated. typeValidation, ClassWriterStrategy The class writer strategy to use. classWriterStrategy, LatentMatcher<? super MethodDescription> A matcher for identifying methods that should be excluded from instrumentation. ignoredMethods, List<DynamicType> A list of explicitly required auxiliary types. auxiliaryTypes, ClassFileLocator The class file locator for locating the original type's class file. classFileLocator)Creates a new decorating dynamic type builder. |
Modifier and Type | Method and Description |
---|---|
public DynamicType. | annotateType(Collection<? extends AnnotationDescription>
The annotations to add to the instrumented type. annotations)Implements net. |
public DynamicType. | attribute(TypeAttributeAppender
The type attribute appender to apply. typeAttributeAppender)Implements net. |
public DynamicType. | declaredTypes(Collection<? extends TypeDescription>
The types being declared. types)Implements net. Defines this type as an the outer type of the supplied types. |
public DynamicType. | defineConstructor(int
The constructor's modifiers. modifiers)Implements net. |
public DynamicType. | defineField(String
The name of the field. name, TypeDefinition The type of the field. Can also be type, int net. if the field type
should be equal to the currently instrumented type.The modifiers of the field. modifiers)Implements net. |
public DynamicType. | defineMethod(String
The name of the method. name, TypeDefinition The method's return type. Can also be returnType, int net. if the return type
should be equal to the currently instrumented type.The method's modifiers. modifiers)Implements net. |
public DynamicType. | defineRecordComponent(String
The record component's name. name, TypeDefinition The record component's type. type)Implements net. |
public DynamicType. | field(LatentMatcher<? super FieldDescription>
The matcher that determines what declared fields are affected by the subsequent specification. matcher)Implements net. Matches a field that is already declared by the instrumented type. |
public DynamicType. | ignoreAlso(LatentMatcher<? super MethodDescription>
The matcher for determining what methods to exclude from instrumentation. ignoredMethods)Implements net. Specifies to exclude any method that is matched by the supplied matcher from instrumentation. |
public DynamicType. | implement(Collection<? extends TypeDefinition>
The interface types to implement. interfaceTypes)Implements net. Implements the supplied interfaces for the instrumented type. |
public DynamicType. | initializer(ByteCodeAppender
The byte code appender to execute within the instrumented type's type initializer. byteCodeAppender)Implements net. Executes the supplied byte code appender within the beginning of the instrumented type's type initializer. |
public DynamicType. | initializer(LoadedTypeInitializer
The loaded type initializer to execute upon loading the instrumented type. loadedTypeInitializer)Implements net. |
public DynamicType. | innerTypeOf(TypeDescription
The type to declare as the built type's outer type. type)Implements net. Defines this type as an inner type of the supplied type. |
public DynamicType. | innerTypeOf(MethodDescription.
The method or constructor to declare as the built type's declaring method. methodDescriptionImplements net. Defines this type as an inner type that was declared within the supplied method or constructor. |
public DynamicType. | invokable(LatentMatcher<? super MethodDescription>
The matcher that determines what declared methods or constructors are affected by the subsequent specification. matcher)Implements net. Matches a method or constructor that is already declared or inherited by the instrumented type. |
public DynamicType. | merge(Collection<? extends ModifierContributor.
The modifiers of the instrumented type. modifierContributors)Implements net. |
public DynamicType. | modifiers(int
The modifiers of the instrumented type. modifiers)Implements net. |
public DynamicType. | name(String
The fully qualified name of the generated class in a binary format. name)Implements net. |
public DynamicType. | nestHost(TypeDescription
The nest host. type)Implements net. Defines this type as a nest member of the supplied type as a nest host. |
public DynamicType. | nestMembers(Collection<? extends TypeDescription>
The nest members. types)Implements net. Defines this type as a nest host for the supplied types. |
public DynamicType. | permittedSubclass(Collection<? extends TypeDescription>
The permitted subclasses. types)Implements net. |
public DynamicType. | recordComponent(LatentMatcher<? super RecordComponentDescription>
The matcher that determines what declared record components are affected by the subsequent specification. matcher)Implements net. Matches a record component that is already declared by the instrumented type. |
public DynamicType. | require(Collection<DynamicType>
The required dynamic types. auxiliaryTypes)Implements net. |
public DynamicType. | suffix(String
The suffix to append to the current type name. suffix)Implements net. |
public DynamicType. | topLevelType()
Implements net. Defines this type as a top-level type that is not declared by another type or enclosed by another member. |
public TypeDescription | toTypeDescription()
Implements net. TypeDescription for the currently built type.
|
protected TypeWriter | toTypeWriter()
Implements abstract net. TypeWriter without an explicitly specified TypePool .
|
protected TypeWriter | toTypeWriter(TypePool
The typePool)TypePool to use.Implements abstract net. TypeWriter given the specified TypePool .
|
public DynamicType. | transform(ElementMatcher<? super TypeDescription.
The matcher to decide what type variables to transform. matcher, Transformer<TypeVariableToken> The transformer to apply to the matched type variables. transformer)Implements net. |
public DynamicType. | typeVariable(String
The type variable's symbol. symbol, Collection<? extends TypeDefinition> The type variable's upper bounds. Can also be bounds)net. if the bound type
should be equal to the currently instrumented type.Implements net. |
public DynamicType. | |
public DynamicType. | visit(AsmVisitorWrapper
The ASM visitor wrapper to apply during asmVisitorWrapper)Implements net. AsmVisitorWrapper onto the net. during building a dynamic type.
|