public interface InstrumentedType extends TypeDescription
Modifier and Type | Interface and Description |
---|---|
static class |
InstrumentedType.Default
A default implementation of an instrumented type.
|
static interface |
InstrumentedType.Factory
A factory for creating an
InstrumentedType . |
static class |
InstrumentedType.Frozen
A frozen representation of an instrumented type of which the structure must not be modified.
|
static interface |
InstrumentedType.Prepareable
Implementations are able to prepare an
InstrumentedType . |
static interface |
InstrumentedType.WithFlexibleName
Implementations represent an
InstrumentedType with a flexible name. |
TypeDescription.AbstractBase, TypeDescription.ArrayProjection, TypeDescription.ForLoadedType, TypeDescription.ForPackageDescription, TypeDescription.Generic, TypeDescription.Latent, TypeDescription.SuperTypeLoading
TypeDefinition.Sort, TypeDefinition.SuperClassIterator
ModifierReviewable.ForFieldDescription, ModifierReviewable.ForMethodDescription, ModifierReviewable.ForParameterDescription, ModifierReviewable.ForTypeDefinition, ModifierReviewable.OfAbstraction, ModifierReviewable.OfByteCodeElement, ModifierReviewable.OfEnumeration
ByteCodeElement.Token<T extends ByteCodeElement.Token<T>>, ByteCodeElement.TypeDependant<T extends ByteCodeElement.TypeDependant<?,S>,S extends ByteCodeElement.Token<S>>
NamedElement.WithDescriptor, NamedElement.WithGenericName, NamedElement.WithOptionalName, NamedElement.WithRuntimeName
AnnotationSource.Empty, AnnotationSource.Explicit
TypeVariableSource.Visitor<T>
ARRAY_INTERFACES, CLASS, OBJECT, STRING, THROWABLE, UNDEFINED, VOID
RAW_TYPES_PROPERTY
EMPTY_MASK
NON_GENERIC_SIGNATURE
EMPTY_NAME, NO_NAME
Modifier and Type | Method and Description |
---|---|
LoadedTypeInitializer |
getLoadedTypeInitializer()
Returns the
LoadedTypeInitializer s that were registered
for this instrumented type. |
TypeInitializer |
getTypeInitializer()
Returns this instrumented type's type initializer.
|
TypeDescription |
validated()
Validates the instrumented type to define a legal Java type.
|
InstrumentedType |
withAnnotations(List<? extends AnnotationDescription> annotationDescriptions)
Creates a new instrumented type with the given annotations.
|
InstrumentedType |
withAnonymousClass(boolean anonymousClass)
Creates a new instrumented type that indicates that it is defined as an anonymous class.
|
InstrumentedType |
withDeclaredTypes(TypeList declaredTypes)
Creates a new instrumented type that indicates that it declared the supplied types.
|
InstrumentedType |
withDeclaringType(TypeDescription declaringType)
Creates a new instrumented type that is declared by the supplied type..
|
InstrumentedType |
withEnclosingMethod(MethodDescription.InDefinedShape enclosingMethod)
Creates a new instrumented type with the supplied enclosing method.
|
InstrumentedType |
withEnclosingType(TypeDescription enclosingType)
Creates a new instrumented type with the supplied enclosing type.
|
InstrumentedType |
withField(FieldDescription.Token token)
Creates a new instrumented type that includes a new field.
|
InstrumentedType |
withInitializer(ByteCodeAppender byteCodeAppender)
Creates a new instrumented type that executes the given initializer in the instrumented type's
type initializer.
|
InstrumentedType |
withInitializer(LoadedTypeInitializer loadedTypeInitializer)
Creates a new instrumented type that includes the given
LoadedTypeInitializer . |
InstrumentedType |
withInterfaces(TypeList.Generic interfaceTypes)
Creates a new instrumented type with the given interfaces implemented.
|
InstrumentedType |
withLocalClass(boolean localClass)
Creates a new instrumented type that indicates that is defined as a local class.
|
InstrumentedType |
withMethod(MethodDescription.Token token)
Creates a new instrumented type that includes a new method or constructor.
|
InstrumentedType |
withModifiers(int modifiers)
Creates a new instrumented type with changed modifiers.
|
InstrumentedType |
withNestHost(TypeDescription nestHost)
Creates a new instrumented type with the supplied nest host.
|
InstrumentedType |
withNestMembers(TypeList nestMembers)
Creates a new instrumented types with the supplied nest members added to this instrumented type.
|
InstrumentedType |
withPermittedSubclasses(TypeList permittedSubclasses)
Creates a new instrumented type that includes the supplied permitted subclasses.
|
InstrumentedType |
withRecord(boolean record)
Creates a new instrumented type that indicates that it defined as a record type.
|
InstrumentedType |
withRecordComponent(RecordComponentDescription.Token token)
Creates a new instrumented type that includes a new record component.
|
InstrumentedType |
withSealed(boolean sealed)
Creates a new instrumented type that indicates that it defined as a sealed type.
|
InstrumentedType |
withTypeVariable(TypeVariableToken typeVariable)
Creates a new instrumented type with the given type variable defined.
|
asBoxed, asUnboxed, getActualModifiers, getCanonicalName, getComponentType, getDeclaredFields, getDeclaredMethods, getDeclaredTypes, getDeclaringType, getDefaultValue, getEnclosingMethod, getEnclosingType, getInheritedAnnotations, getInnerClassCount, getNestHost, getNestMembers, getPackage, getPermittedSubclasses, getRecordComponents, getSimpleName, isAnnotationReturnType, isAnnotationValue, isAnnotationValue, isAnonymousType, isAssignableFrom, isAssignableFrom, isAssignableTo, isAssignableTo, isCompileTimeConstant, isInHierarchyWith, isInHierarchyWith, isInnerClass, isInstance, isLocalType, isMemberType, isNestedClass, isNestHost, isNestMateOf, isNestMateOf, isPackageType, isPrimitiveWrapper, isSamePackage, isSealed
asErasure, asGenericType, getInterfaces, getSort, getStackSize, getSuperClass, getTypeName, isArray, isPrimitive, isRecord, represents
getTypeManifestation, isAnnotation, isInterface
isAbstract
getEnumerationState, isEnum
getOwnership, getVisibility, isDeprecated, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic
getModifiers, getSyntheticState, isFinal, isSynthetic
forEach, iterator, spliterator
isAccessibleTo, isVisibleTo
getInternalName, getName
getDescriptor, getGenericSignature
getActualName
getDeclaredAnnotations
accept, findVariable, getEnclosingSource, getTypeVariables, isGenerified, isInferrable
InstrumentedType withField(FieldDescription.Token token)
token
- A token that represents the field's shape.InstrumentedType withMethod(MethodDescription.Token token)
token
- A token that represents the method's shape.InstrumentedType withRecordComponent(RecordComponentDescription.Token token)
token
- A token that represents the record component's shape.InstrumentedType withModifiers(int modifiers)
modifiers
- The instrumented type's modifiers.InstrumentedType withInterfaces(TypeList.Generic interfaceTypes)
interfaceTypes
- The interface types to implement.InstrumentedType withTypeVariable(TypeVariableToken typeVariable)
typeVariable
- The type variable to declare.InstrumentedType withAnnotations(List<? extends AnnotationDescription> annotationDescriptions)
annotationDescriptions
- The annotations to add to the instrumented type.InstrumentedType withNestHost(TypeDescription nestHost)
nestHost
- The nest host of the created instrumented type.InstrumentedType withNestMembers(TypeList nestMembers)
nestMembers
- The nest members to add to the created instrumented type.InstrumentedType withEnclosingType(TypeDescription enclosingType)
enclosingType
- The type to define as the created instrumented type's enclosing type.InstrumentedType withEnclosingMethod(MethodDescription.InDefinedShape enclosingMethod)
enclosingMethod
- The method to define as the created instrumented type's enclosing method.InstrumentedType withDeclaringType(TypeDescription declaringType)
declaringType
- The type that declares the instrumented type.InstrumentedType withDeclaredTypes(TypeList declaredTypes)
declaredTypes
- The types to add to the created instrumented type as declared types.InstrumentedType withPermittedSubclasses(TypeList permittedSubclasses)
permittedSubclasses
- A list of permitted subclasses to include.InstrumentedType withLocalClass(boolean localClass)
localClass
- true
if the instrumented type is supposed to be treated as a local class.InstrumentedType withAnonymousClass(boolean anonymousClass)
anonymousClass
- true
if the instrumented type is supposed to be treated as an anonymous class.InstrumentedType withRecord(boolean record)
record
- true
if the instrumented type is supposed to be a record.InstrumentedType withSealed(boolean sealed)
sealed
- true
if the instrumented type is supposed to be sealed.InstrumentedType withInitializer(LoadedTypeInitializer loadedTypeInitializer)
LoadedTypeInitializer
.loadedTypeInitializer
- The type initializer to include.InstrumentedType withInitializer(ByteCodeAppender byteCodeAppender)
byteCodeAppender
- The byte code to add to the type initializer.LoadedTypeInitializer getLoadedTypeInitializer()
LoadedTypeInitializer
s that were registered
for this instrumented type.TypeInitializer getTypeInitializer()
TypeDescription validated()
Copyright © 2014–2020. All rights reserved.