Top Description Inners Fields Methods
net.bytebuddy.dynamic.scaffold

public Interface InstrumentedType

extends TypeDescription
Known Direct Subinterfaces
net.bytebuddy.dynamic.scaffold.InstrumentedType.WithFlexibleName
Imports
edu.umd.cs.findbugs.annotations.SuppressFBWarnings, net.bytebuddy.ClassFileVersion, net.bytebuddy.description.annotation.AnnotationDescription, .AnnotationList, .AnnotationValue, net.bytebuddy.description.field.FieldDescription, .FieldList, net.bytebuddy.description.method.MethodDescription, .MethodList, .ParameterDescription, net.bytebuddy.description.modifier.ModifierContributor, net.bytebuddy.description.type.*, net.bytebuddy.dynamic.TargetType, .Transformer, net.bytebuddy.implementation.LoadedTypeInitializer, net.bytebuddy.implementation.bytecode.ByteCodeAppender, net.bytebuddy.matcher.ElementMatcher, net.bytebuddy.utility.CompoundList, .JavaType, net.bytebuddy.utility.nullability.MaybeNull, java.lang.annotation.ElementType, java.util.*

Implementations of this interface represent an instrumented type that is subject to change. Implementations should however be immutable and return new instance when its builder methods are invoked.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
InstrumentedType.Default

A default implementation of an instrumented type.

public static interface
InstrumentedType.Factory

A factory for creating an InstrumentedType.

public static class
InstrumentedType.Frozen

A frozen representation of an instrumented type of which the structure must not be modified.

public static interface
InstrumentedType.Prepareable

Implementations are able to prepare an InstrumentedType.

public static interface
InstrumentedType.WithFlexibleName

Implementations represent an InstrumentedType with a flexible name.

Field Summary

Inherited from net.bytebuddy.description.type.TypeDescription:
ARRAY_INTERFACESCLASSOBJECTSTRINGTHROWABLEUNDEFINEDVOID

Method Summary

Modifier and TypeMethod and Description
public LoadedTypeInitializer

Returns:

The registered loaded type initializers for this instrumented type.
getLoadedTypeInitializer
()

Returns the net.bytebuddy.implementation.LoadedTypeInitializers that were registered for this instrumented type.

public TypeInitializer

Returns:

This instrumented type's type initializer.
getTypeInitializer
()

Returns this instrumented type's type initializer.

public TypeDescription

Returns:

This instrumented type as a non-modifiable type description.
validated
()

Validates the instrumented type to define a legal Java type.

public InstrumentedType

Returns:

A new instrumented type that is equal to this instrumented type but annotated with the given annotations
withAnnotations
(List<? extends AnnotationDescription>
The annotations to add to the instrumented type.
annotationDescriptions
)

Creates a new instrumented type with the given annotations.

public InstrumentedType

Returns:

A new instrumented type that is treated as an anonymous class.
withAnonymousClass
(boolean
true if the instrumented type is supposed to be treated as an anonymous class.
anonymousClass
)

Creates a new instrumented type that indicates that it is defined as an anonymous class.

public InstrumentedType

Returns:

A new instrumented type that is equal to this instrumented type but with the additional field.
withAuxiliaryField
(FieldDescription.Token
A token that represents the field's shape.
token
,
Object
The value that this assigned to this field.
value
)

Creates a new instrumented type that includes a new field.

public InstrumentedType

Returns:

A new instrumented type that indicates that it has declared the supplied types.
withDeclaredTypes
(TypeList
The types to add to the created instrumented type as declared types.
declaredTypes
)

Creates a new instrumented type that indicates that it declared the supplied types.

public InstrumentedType

Returns:

A new instrumented type that is declared by the instrumented type.
withDeclaringType
(TypeDescription
The type that declares the instrumented type or null if no such type exists.
declaringType
)

Creates a new instrumented type that is declared by the supplied type.

public InstrumentedType

Returns:

A new instrumented type with the supplied method as its enclosing method.
withEnclosingMethod
(MethodDescription.InDefinedShape
The method to define as the created instrumented type's enclosing method.
enclosingMethod
)

Creates a new instrumented type with the supplied enclosing method.

public InstrumentedType

Returns:

A new instrumented type with the supplied type as its enclosing type.
withEnclosingType
(TypeDescription
The type to define as the created instrumented type's enclosing type.
enclosingType
)

Creates a new instrumented type with the supplied enclosing type.

public InstrumentedType

Returns:

A new instrumented type that is equal to this instrumented type but with the additional field.
withField
(FieldDescription.Token
A token that represents the field's shape.
token
)

Creates a new instrumented type that includes a new field.

public InstrumentedType

Returns:

A new instrumented type that is equal to this instrumented type but with the additional type initializer.
withInitializer
(LoadedTypeInitializer
The type initializer to include.
loadedTypeInitializer
)

Creates a new instrumented type that includes the given net.bytebuddy.implementation.LoadedTypeInitializer.

public InstrumentedType

Returns:

A new instrumented type that is equal to this instrumented type but with the given stack manipulation attached to its type initializer.
withInitializer
(ByteCodeAppender
The byte code to add to the type initializer.
byteCodeAppender
)

Creates a new instrumented type that executes the given initializer in the instrumented type's type initializer.

public InstrumentedType

Returns:

A new instrumented type that is equal to this instrumented type but with the given interfaces implemented.
withInterfaces
(TypeList.Generic
The interface types to implement.
interfaceTypes
)

Creates a new instrumented type with the given interfaces implemented.

public InstrumentedType

Returns:

A new instrumented type that is treated as a local class.
withLocalClass
(boolean
true if the instrumented type is supposed to be treated as a local class.
localClass
)

Creates a new instrumented type that indicates that is defined as a local class.

public InstrumentedType

Returns:

A new instrumented type that is equal to this instrumented type but with the additional method.
withMethod
(MethodDescription.Token
A token that represents the method's shape.
token
)

Creates a new instrumented type that includes a new method or constructor.

public InstrumentedType

Returns:

A new instrumented type that is equal to this instrumented type but with the given modifiers.
withModifiers
(int
The instrumented type's modifiers.
modifiers
)

Creates a new instrumented type with changed modifiers.

public InstrumentedType

Returns:

A new instrumented type with the supplied type as its nest host.
withNestHost
(TypeDescription
The nest host of the created instrumented type.
nestHost
)

Creates a new instrumented type with the supplied nest host.

public InstrumentedType

Returns:

A new instrumented type that applies the supplied nest members.
withNestMembers
(TypeList
The nest members to add to the created instrumented type.
nestMembers
)

Creates a new instrumented types with the supplied nest members added to this instrumented type.

public InstrumentedType

Returns:

A new instrumented type that includes the supplied permitted subclasses or unseals the type.
withPermittedSubclasses
(TypeList
A list of permitted subclasses to include or null to unseal the type.
permittedSubclasses
)

Creates a new instrumented type that includes the supplied permitted subclasses or unseals the type.

public InstrumentedType

Returns:

A new instrumented type that is defined as a record.
withRecord
(boolean
true if the instrumented type is supposed to be a record.
record
)

Creates a new instrumented type that indicates that it defined as a record type.

public InstrumentedType

Returns:

A new instrumented type that is equal to this instrumented type but with the additional record component.
withRecordComponent
(RecordComponentDescription.Token
A token that represents the record component's shape.
token
)

Creates a new instrumented type that includes a new record component.

public InstrumentedType

Returns:

A new instrumented type that is equal to this instrumented type but with the given type variable declared.
withTypeVariable
(TypeVariableToken
The type variable to declare.
typeVariable
)

Creates a new instrumented type with the given type variable defined.

Inherited from net.bytebuddy.description.type.TypeDescription:
asBoxedasUnboxedgetActualModifiersgetCanonicalNamegetClassFileVersiongetComponentTypegetDeclaredFieldsgetDeclaredMethodsgetDeclaredTypesgetDeclaringTypegetDefaultValuegetEnclosingMethodgetEnclosingTypegetInheritedAnnotationsgetInnerClassCountgetLongSimpleNamegetNestHostgetNestMembersgetPackagegetPermittedSubtypesgetRecordComponentsgetSimpleNameisAnnotationReturnTypeisAnnotationValueisAnnotationValueisAnonymousTypeisAssignableFromisAssignableFromisAssignableToisAssignableToisCompileTimeConstantisInHierarchyWithisInHierarchyWithisInnerClassisInstanceisLocalTypeisMemberTypeisNestedClassisNestHostisNestMateOfisNestMateOfisPackageTypeisPrimitiveWrapperisSamePackageisSealed