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.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
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.WithGenericName, NamedElement.WithOptionalName, NamedElement.WithRuntimeName
TypeVariableSource.Visitor<T>
ARRAY_INTERFACES, CLASS, OBJECT, STRING, THROWABLE, UNDEFINED, VOID
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 |
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 |
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 |
withTypeVariable(TypeVariableToken typeVariable)
Creates a new instrumented type with the given type variable defined.
|
getActualModifiers, getCanonicalName, getComponentType, getDeclaredFields, getDeclaredMethods, getDeclaredTypes, getDeclaringType, getEnclosingMethod, getEnclosingType, getInheritedAnnotations, getPackage, getSegmentCount, getSimpleName, isAnnotationReturnType, isAnnotationValue, isAnnotationValue, isAnonymousClass, isAssignableFrom, isAssignableFrom, isAssignableTo, isAssignableTo, isConstantPool, isInstance, isInstanceOrWrapper, isLocalClass, isMemberClass, isPackageType, isPrimitiveWrapper, isSamePackage
asErasure, asGenericType, getInterfaces, getSort, getStackSize, getSuperClass, getTypeName, isArray, isPrimitive, represents
isAnnotation, isInterface
isAbstract
isEnum
isDeprecated, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic
getModifiers, isFinal, isSynthetic
forEach, iterator, spliterator
getDescriptor, getGenericSignature, isVisibleTo
getInternalName, getName
getActualName
getDeclaredAnnotations
accept, findVariable, getEnclosingSource, getTypeVariables, isGenericDeclaration
InstrumentedType withField(FieldDescription.Token token)
token
- A token that represents the field's shape. This token must represent types in their detached state.InstrumentedType withMethod(MethodDescription.Token token)
token
- A token that represents the method's shape. This token must represent types in their detached state.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 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–2016. All rights reserved.