public static interface InstrumentedType.WithFlexibleName extends InstrumentedType
InstrumentedType
with a flexible name.InstrumentedType.Default, InstrumentedType.Factory, InstrumentedType.Frozen, InstrumentedType.Prepareable, InstrumentedType.WithFlexibleName
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.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 |
---|---|
InstrumentedType.WithFlexibleName |
withAnnotations(List<? extends AnnotationDescription> annotationDescriptions)
Creates a new instrumented type with the given annotations.
|
InstrumentedType.WithFlexibleName |
withAnonymousClass(boolean anonymousClass)
Creates a new instrumented type that indicates that is defined as an anonymous class.
|
InstrumentedType.WithFlexibleName |
withDeclaredTypes(TypeList declaredTypes)
Creates a new instrumented type that indicates that it declared the supplied types.
|
InstrumentedType.WithFlexibleName |
withDeclaringType(TypeDescription declaringType)
Creates a new instrumented type that is declared by the supplied type..
|
InstrumentedType.WithFlexibleName |
withEnclosingMethod(MethodDescription.InDefinedShape enclosingMethod)
Creates a new instrumented type with the supplied enclosing method.
|
InstrumentedType.WithFlexibleName |
withEnclosingType(TypeDescription enclosingType)
Creates a new instrumented type with the supplied enclosing type.
|
InstrumentedType.WithFlexibleName |
withField(FieldDescription.Token token)
Creates a new instrumented type that includes a new field.
|
InstrumentedType.WithFlexibleName |
withInitializer(ByteCodeAppender byteCodeAppender)
Creates a new instrumented type that executes the given initializer in the instrumented type's
type initializer.
|
InstrumentedType.WithFlexibleName |
withInitializer(LoadedTypeInitializer loadedTypeInitializer)
Creates a new instrumented type that includes the given
LoadedTypeInitializer . |
InstrumentedType.WithFlexibleName |
withInterfaces(TypeList.Generic interfaceTypes)
Creates a new instrumented type with the given interfaces implemented.
|
InstrumentedType.WithFlexibleName |
withLocalClass(boolean localClass)
Creates a new instrumented type that indicates that is defined as a local class.
|
InstrumentedType.WithFlexibleName |
withMethod(MethodDescription.Token token)
Creates a new instrumented type that includes a new method or constructor.
|
InstrumentedType.WithFlexibleName |
withModifiers(int modifiers)
Creates a new instrumented type with changed modifiers.
|
InstrumentedType.WithFlexibleName |
withName(String name)
Creates a new instrumented type with a changed name.
|
InstrumentedType.WithFlexibleName |
withNestHost(TypeDescription nestHost)
Creates a new instrumented type with the supplied nest host.
|
InstrumentedType.WithFlexibleName |
withNestMembers(TypeList nestMembers)
Creates a new instrumented types with the supplied nest members added to this instrumented type.
|
InstrumentedType.WithFlexibleName |
withTypeVariable(TypeVariableToken typeVariable)
Creates a new instrumented type with the given type variable defined.
|
InstrumentedType.WithFlexibleName |
withTypeVariables(ElementMatcher<? super TypeDescription.Generic> matcher,
Transformer<TypeVariableToken> transformer)
Applies a transformation onto all existing type variables of this instrumented type.
|
getLoadedTypeInitializer, getTypeInitializer, validated
asBoxed, asUnboxed, getActualModifiers, getCanonicalName, getComponentType, getDeclaredFields, getDeclaredMethods, getDeclaredTypes, getDeclaringType, getDefaultValue, getEnclosingMethod, getEnclosingType, getInheritedAnnotations, getInnerClassCount, getNestHost, getNestMembers, getPackage, getSimpleName, isAnnotationReturnType, isAnnotationValue, isAnnotationValue, isAnonymousType, isAssignableFrom, isAssignableFrom, isAssignableTo, isAssignableTo, isInHierarchyWith, isInHierarchyWith, isInnerClass, isInstance, isLocalType, isMemberType, isNestedClass, isNestHost, isNestMateOf, isNestMateOf, isPackageType, isPrimitiveWrapper, isSamePackage
asErasure, asGenericType, getInterfaces, getSort, getStackSize, getSuperClass, getTypeName, isArray, isPrimitive, represents
getTypeManifestation, isAnnotation, isInterface
isAbstract
getEnumerationState, isEnum
getOwnership, getVisibility, isDeprecated, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic
getModifiers, getSyntheticState, isFinal, isSynthetic
forEach, iterator, spliterator
getDescriptor, getGenericSignature, isAccessibleTo, isVisibleTo
getInternalName, getName
getActualName
getDeclaredAnnotations
accept, findVariable, getEnclosingSource, getTypeVariables, isGenerified, isInferrable
InstrumentedType.WithFlexibleName withField(FieldDescription.Token token)
withField
in interface InstrumentedType
token
- A token that represents the field's shape. This token must represent types in their detached state.InstrumentedType.WithFlexibleName withMethod(MethodDescription.Token token)
withMethod
in interface InstrumentedType
token
- A token that represents the method's shape. This token must represent types in their detached state.InstrumentedType.WithFlexibleName withModifiers(int modifiers)
withModifiers
in interface InstrumentedType
modifiers
- The instrumented type's modifiers.InstrumentedType.WithFlexibleName withInterfaces(TypeList.Generic interfaceTypes)
withInterfaces
in interface InstrumentedType
interfaceTypes
- The interface types to implement.InstrumentedType.WithFlexibleName withNestHost(TypeDescription nestHost)
withNestHost
in interface InstrumentedType
nestHost
- The nest host of the created instrumented type.InstrumentedType.WithFlexibleName withNestMembers(TypeList nestMembers)
withNestMembers
in interface InstrumentedType
nestMembers
- The nest members to add to the created instrumented type.InstrumentedType.WithFlexibleName withEnclosingType(TypeDescription enclosingType)
withEnclosingType
in interface InstrumentedType
enclosingType
- The type to define as the created instrumented type's enclosing type.InstrumentedType.WithFlexibleName withEnclosingMethod(MethodDescription.InDefinedShape enclosingMethod)
withEnclosingMethod
in interface InstrumentedType
enclosingMethod
- The method to define as the created instrumented type's enclosing method.InstrumentedType.WithFlexibleName withDeclaringType(TypeDescription declaringType)
withDeclaringType
in interface InstrumentedType
declaringType
- The type that declares the instrumented type.InstrumentedType.WithFlexibleName withDeclaredTypes(TypeList declaredTypes)
withDeclaredTypes
in interface InstrumentedType
declaredTypes
- The types to add to the created instrumented type as declared types.InstrumentedType.WithFlexibleName withLocalClass(boolean localClass)
withLocalClass
in interface InstrumentedType
localClass
- true
if the instrumented type is supposed to be treated as a local class.InstrumentedType.WithFlexibleName withAnonymousClass(boolean anonymousClass)
withAnonymousClass
in interface InstrumentedType
anonymousClass
- true
if the instrumented type is supposed to be treated as an anonymous class.InstrumentedType.WithFlexibleName withTypeVariable(TypeVariableToken typeVariable)
withTypeVariable
in interface InstrumentedType
typeVariable
- The type variable to declare.InstrumentedType.WithFlexibleName withAnnotations(List<? extends AnnotationDescription> annotationDescriptions)
withAnnotations
in interface InstrumentedType
annotationDescriptions
- The annotations to add to the instrumented type.InstrumentedType.WithFlexibleName withInitializer(LoadedTypeInitializer loadedTypeInitializer)
LoadedTypeInitializer
.withInitializer
in interface InstrumentedType
loadedTypeInitializer
- The type initializer to include.InstrumentedType.WithFlexibleName withInitializer(ByteCodeAppender byteCodeAppender)
withInitializer
in interface InstrumentedType
byteCodeAppender
- The byte code to add to the type initializer.InstrumentedType.WithFlexibleName withName(String name)
name
- The name of the instrumented type.InstrumentedType.WithFlexibleName withTypeVariables(ElementMatcher<? super TypeDescription.Generic> matcher, Transformer<TypeVariableToken> transformer)
matcher
- The matcher to decide what type variables to transform.transformer
- The transformer to apply on all matched type variables.Copyright © 2014–2020. All rights reserved.