Package net.bytebuddy.dynamic.scaffold
Interface InstrumentedType.WithFlexibleName
-
- All Superinterfaces:
AnnotationSource
,ByteCodeElement
,DeclaredByType
,InstrumentedType
,java.lang.Iterable<TypeDefinition>
,ModifierReviewable
,ModifierReviewable.ForTypeDefinition
,ModifierReviewable.OfAbstraction
,ModifierReviewable.OfByteCodeElement
,ModifierReviewable.OfEnumeration
,NamedElement
,NamedElement.WithRuntimeName
,TypeDefinition
,TypeDescription
,TypeVariableSource
- All Known Implementing Classes:
InstrumentedType.Default
,InstrumentedType.Frozen
- Enclosing interface:
- InstrumentedType
public static interface InstrumentedType.WithFlexibleName extends InstrumentedType
Implementations represent anInstrumentedType
with a flexible name.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.annotation.AnnotationSource
AnnotationSource.Empty, AnnotationSource.Explicit
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.ByteCodeElement
ByteCodeElement.Token<T extends ByteCodeElement.Token<T>>, ByteCodeElement.TypeDependant<T extends ByteCodeElement.TypeDependant<?,S>,S extends ByteCodeElement.Token<S>>
-
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.scaffold.InstrumentedType
InstrumentedType.Default, InstrumentedType.Factory, InstrumentedType.Frozen, InstrumentedType.Prepareable, InstrumentedType.WithFlexibleName
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.ModifierReviewable
ModifierReviewable.ForFieldDescription, ModifierReviewable.ForMethodDescription, ModifierReviewable.ForParameterDescription, ModifierReviewable.ForTypeDefinition, ModifierReviewable.OfAbstraction, ModifierReviewable.OfByteCodeElement, ModifierReviewable.OfEnumeration
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.NamedElement
NamedElement.WithGenericName, NamedElement.WithOptionalName, NamedElement.WithRuntimeName
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.type.TypeDefinition
TypeDefinition.Sort, TypeDefinition.SuperClassIterator
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.type.TypeDescription
TypeDescription.AbstractBase, TypeDescription.ArrayProjection, TypeDescription.ForLoadedType, TypeDescription.ForPackageDescription, TypeDescription.Generic, TypeDescription.Latent, TypeDescription.SuperTypeLoading
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.TypeVariableSource
TypeVariableSource.Visitor<T>
-
-
Field Summary
-
Fields inherited from interface net.bytebuddy.description.ByteCodeElement
NON_GENERIC_SIGNATURE
-
Fields inherited from interface net.bytebuddy.description.ModifierReviewable
EMPTY_MASK
-
Fields inherited from interface net.bytebuddy.description.NamedElement
EMPTY_NAME, NO_NAME
-
Fields inherited from interface net.bytebuddy.description.type.TypeDefinition
RAW_TYPES_PROPERTY
-
Fields inherited from interface net.bytebuddy.description.type.TypeDescription
ARRAY_INTERFACES, CLASS, OBJECT, STRING, THROWABLE, UNDEFINED, VOID
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description InstrumentedType.WithFlexibleName
withAnnotations(java.util.List<? extends AnnotationDescription> annotationDescriptions)
Creates a new instrumented type with the given annotations.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 givenLoadedTypeInitializer
.InstrumentedType.WithFlexibleName
withInterfaces(TypeList.Generic interfaceTypes)
Creates a new instrumented type with the given interfaces implemented.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(java.lang.String name)
Creates a new instrumented type with a changed name.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.-
Methods inherited from interface net.bytebuddy.description.annotation.AnnotationSource
getDeclaredAnnotations
-
Methods inherited from interface net.bytebuddy.description.ByteCodeElement
getDescriptor, getGenericSignature, isAccessibleTo, isVisibleTo
-
Methods inherited from interface net.bytebuddy.dynamic.scaffold.InstrumentedType
getLoadedTypeInitializer, getTypeInitializer, validated
-
Methods inherited from interface net.bytebuddy.description.ModifierReviewable
getModifiers, getSyntheticState, isFinal, isSynthetic
-
Methods inherited from interface net.bytebuddy.description.ModifierReviewable.ForTypeDefinition
getTypeManifestation, isAnnotation, isInterface
-
Methods inherited from interface net.bytebuddy.description.ModifierReviewable.OfAbstraction
isAbstract
-
Methods inherited from interface net.bytebuddy.description.ModifierReviewable.OfByteCodeElement
getOwnership, getVisibility, isDeprecated, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic
-
Methods inherited from interface net.bytebuddy.description.ModifierReviewable.OfEnumeration
getEnumerationState, isEnum
-
Methods inherited from interface net.bytebuddy.description.NamedElement
getActualName
-
Methods inherited from interface net.bytebuddy.description.NamedElement.WithRuntimeName
getInternalName, getName
-
Methods inherited from interface net.bytebuddy.description.type.TypeDefinition
asErasure, asGenericType, getInterfaces, getSort, getStackSize, getSuperClass, getTypeName, isArray, isPrimitive, represents
-
Methods inherited from interface net.bytebuddy.description.type.TypeDescription
asBoxed, asUnboxed, getActualModifiers, getCanonicalName, getComponentType, getDeclaredFields, getDeclaredMethods, getDeclaredTypes, getDeclaringType, getDefaultValue, getEnclosingMethod, getEnclosingType, getInheritedAnnotations, getInnerClassCount, getPackage, getSimpleName, isAnnotationReturnType, isAnnotationValue, isAnnotationValue, isAnonymousClass, isAssignableFrom, isAssignableFrom, isAssignableTo, isAssignableTo, isConstantPool, isInnerClass, isInstance, isLocalClass, isMemberClass, isNestedClass, isPackageType, isPrimitiveWrapper, isSamePackage
-
Methods inherited from interface net.bytebuddy.description.TypeVariableSource
accept, findVariable, getEnclosingSource, getTypeVariables, isGenerified
-
-
-
-
Method Detail
-
withField
InstrumentedType.WithFlexibleName withField(FieldDescription.Token token)
Description copied from interface:InstrumentedType
Creates a new instrumented type that includes a new field.- Specified by:
withField
in interfaceInstrumentedType
- Parameters:
token
- A token that represents the field's shape. This token must represent types in their detached state.- Returns:
- A new instrumented type that is equal to this instrumented type but with the additional field.
-
withMethod
InstrumentedType.WithFlexibleName withMethod(MethodDescription.Token token)
Description copied from interface:InstrumentedType
Creates a new instrumented type that includes a new method or constructor.- Specified by:
withMethod
in interfaceInstrumentedType
- Parameters:
token
- A token that represents the method's shape. This token must represent types in their detached state.- Returns:
- A new instrumented type that is equal to this instrumented type but with the additional method.
-
withModifiers
InstrumentedType.WithFlexibleName withModifiers(int modifiers)
Description copied from interface:InstrumentedType
Creates a new instrumented type with changed modifiers.- Specified by:
withModifiers
in interfaceInstrumentedType
- Parameters:
modifiers
- The instrumented type's modifiers.- Returns:
- A new instrumented type that is equal to this instrumented type but with the given modifiers.
-
withInterfaces
InstrumentedType.WithFlexibleName withInterfaces(TypeList.Generic interfaceTypes)
Description copied from interface:InstrumentedType
Creates a new instrumented type with the given interfaces implemented.- Specified by:
withInterfaces
in interfaceInstrumentedType
- Parameters:
interfaceTypes
- The interface types to implement.- Returns:
- A new instrumented type that is equal to this instrumented type but with the given interfaces implemented.
-
withTypeVariable
InstrumentedType.WithFlexibleName withTypeVariable(TypeVariableToken typeVariable)
Description copied from interface:InstrumentedType
Creates a new instrumented type with the given type variable defined.- Specified by:
withTypeVariable
in interfaceInstrumentedType
- Parameters:
typeVariable
- The type variable to declare.- Returns:
- A new instrumented type that is equal to this instrumented type but with the given type variable declared.
-
withAnnotations
InstrumentedType.WithFlexibleName withAnnotations(java.util.List<? extends AnnotationDescription> annotationDescriptions)
Description copied from interface:InstrumentedType
Creates a new instrumented type with the given annotations.- Specified by:
withAnnotations
in interfaceInstrumentedType
- Parameters:
annotationDescriptions
- The annotations to add to the instrumented type.- Returns:
- A new instrumented type that is equal to this instrumented type but annotated with the given annotations
-
withInitializer
InstrumentedType.WithFlexibleName withInitializer(LoadedTypeInitializer loadedTypeInitializer)
Description copied from interface:InstrumentedType
Creates a new instrumented type that includes the givenLoadedTypeInitializer
.- Specified by:
withInitializer
in interfaceInstrumentedType
- Parameters:
loadedTypeInitializer
- The type initializer to include.- Returns:
- A new instrumented type that is equal to this instrumented type but with the additional type initializer.
-
withInitializer
InstrumentedType.WithFlexibleName withInitializer(ByteCodeAppender byteCodeAppender)
Description copied from interface:InstrumentedType
Creates a new instrumented type that executes the given initializer in the instrumented type's type initializer.- Specified by:
withInitializer
in interfaceInstrumentedType
- Parameters:
byteCodeAppender
- The byte code to add to the type initializer.- Returns:
- A new instrumented type that is equal to this instrumented type but with the given stack manipulation attached to its type initializer.
-
withName
InstrumentedType.WithFlexibleName withName(java.lang.String name)
Creates a new instrumented type with a changed name.- Parameters:
name
- The name of the instrumented type.- Returns:
- A new instrumented type that has the given name.
-
withTypeVariables
InstrumentedType.WithFlexibleName withTypeVariables(ElementMatcher<? super TypeDescription.Generic> matcher, Transformer<TypeVariableToken> transformer)
Applies a transformation onto all existing type variables of this instrumented type. A transformation is potentially unsafe and it is the responsibility of the supplier to return a valid type variable token from the transformer.- Parameters:
matcher
- The matcher to decide what type variables to transform.transformer
- The transformer to apply on all matched type variables.- Returns:
- A new instrumented type with all matched type variables transformed.
-
-