public class InlineInstrumentedType extends InstrumentedType.AbstractBase
InstrumentedType.AbstractBase.FieldToken, InstrumentedType.AbstractBase.MethodToken
TypeDescription.AbstractTypeDescription.OfSimpleType
InstrumentedType.AbstractBase, InstrumentedType.TypeInitializer
TypeDescription.AbstractTypeDescription, TypeDescription.ArrayProjection, TypeDescription.ForLoadedType, TypeDescription.Latent
ModifierReviewable.AbstractModifierReviewable
fieldDescriptions, loadedTypeInitializer, methodDescriptions, typeInitializer
CLASS, ENUM, OBJECT, STRING, VOID
EMPTY_NAME
EMPTY_MASK
Modifier | Constructor and Description |
---|---|
|
InlineInstrumentedType(ClassFileVersion classFileVersion,
TypeDescription levelType,
List<TypeDescription> interfaces,
int modifiers,
NamingStrategy namingStrategy)
Creates a new inlined instrumented type.
|
protected |
InlineInstrumentedType(TypeDescription levelType,
String name,
List<TypeDescription> interfaces,
int modifiers,
List<? extends FieldDescription> fieldDescriptions,
List<? extends MethodDescription> methodDescriptions,
LoadedTypeInitializer loadedTypeInitializer,
InstrumentedType.TypeInitializer typeInitializer)
Creates a new inlined instrumented type.
|
Modifier and Type | Method and Description |
---|---|
TypeDescription |
detach()
Creates a compressed version of this instrumented type which only needs to fulfil the
TypeDescription interface. |
AnnotationList |
getDeclaredAnnotations()
Returns a list of annotations that are declared by this instance.
|
AnnotationList |
getInheritedAnnotations()
Returns the annotations that this type declares or inherits from super types.
|
TypeList |
getInterfaces()
Returns a list of interfaces that are implemented by this type.
|
int |
getModifiers()
Returns the modifier that is described by this object.
|
String |
getName()
Returns the internalName of this byte code element.
|
TypeDescription |
getSupertype()
Returns the component type of this type.
|
InstrumentedType |
withField(String internalName,
TypeDescription fieldType,
int modifiers)
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 |
withMethod(String internalName,
TypeDescription returnType,
List<? extends TypeDescription> parameterTypes,
List<? extends TypeDescription> exceptionTypes,
int modifiers)
Creates a new instrumented type that includes a new method or constructor.
|
getCanonicalName, getDeclaredFields, getDeclaredMethods, getDeclaringType, getEnclosingMethod, getEnclosingType, getLoadedTypeInitializer, getPackage, getTypeInitializer, isAnonymousClass, isLocalClass, isMemberClass
getComponentType, getDescriptor, getSimpleName, getStackSize, isArray, isAssignableFrom, isAssignableFrom, isAssignableTo, isAssignableTo, isInstance, isPrimitive, represents
equals, getActualModifiers, getGenericSignature, getInheritedInterfaces, getInternalName, getPackageName, getSourceCodeName, hashCode, isAnnotationReturnType, isAnnotationValue, isAnnotationValue, isConstantPool, isInstanceOrWrapper, isPrimitiveWrapper, isSamePackage, isVisibleTo, toString
isAbstract, isAnnotation, isBridge, isDeprecated, isEnum, isFinal, isInterface, isMandated, isNative, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isStrict, isSuper, isSynchronized, isSynthetic, isTransient, isVarArgs, isVolatile
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getActualModifiers, getComponentType, getInheritedInterfaces, getSimpleName, getStackSize, isAnnotationReturnType, isAnnotationValue, isAnnotationValue, isArray, isAssignableFrom, isAssignableFrom, isAssignableTo, isAssignableTo, isConstantPool, isInstance, isInstanceOrWrapper, isPrimitive, isPrimitiveWrapper, isSamePackage, represents
getDescriptor, getGenericSignature, isVisibleTo
getInternalName, getSourceCodeName
isAbstract, isAnnotation, isBridge, isDeprecated, isEnum, isFinal, isInterface, isMandated, isNative, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isStrict, isSuper, isSynchronized, isSynthetic, isTransient, isVarArgs, isVolatile
public InlineInstrumentedType(ClassFileVersion classFileVersion, TypeDescription levelType, List<TypeDescription> interfaces, int modifiers, NamingStrategy namingStrategy)
classFileVersion
- The class file version for the given type.levelType
- The name of the instrumented type.interfaces
- The additional interfaces that this type should implement.modifiers
- The name of the instrumented type.namingStrategy
- The naming strategy to apply for the given type.protected InlineInstrumentedType(TypeDescription levelType, String name, List<TypeDescription> interfaces, int modifiers, List<? extends FieldDescription> fieldDescriptions, List<? extends MethodDescription> methodDescriptions, LoadedTypeInitializer loadedTypeInitializer, InstrumentedType.TypeInitializer typeInitializer)
levelType
- The name of the instrumented type.name
- The name of the instrumented type.interfaces
- The additional interfaces that this type should implement.modifiers
- The name of the instrumented type.fieldDescriptions
- A list of field descriptions for this instrumented type.methodDescriptions
- A list of method descriptions for this instrumented type.loadedTypeInitializer
- A loaded type initializer for this instrumented type.typeInitializer
- A type initializer for this instrumented type.public InstrumentedType withField(String internalName, TypeDescription fieldType, int modifiers)
InstrumentedType
internalName
- The internal name of the new field.fieldType
- A description of the type of the new field.modifiers
- The modifier of the new field.public InstrumentedType withMethod(String internalName, TypeDescription returnType, List<? extends TypeDescription> parameterTypes, List<? extends TypeDescription> exceptionTypes, int modifiers)
InstrumentedType
internalName
- The internal name of the new field.returnType
- A description of the return type of the new field.parameterTypes
- A list of descriptions of the parameter types.exceptionTypes
- A list of descriptions of the exception types that are declared by this method.modifiers
- The modifier of the new field.public InstrumentedType withInitializer(LoadedTypeInitializer loadedTypeInitializer)
InstrumentedType
LoadedTypeInitializer
.loadedTypeInitializer
- The type initializer to include.public InstrumentedType withInitializer(ByteCodeAppender byteCodeAppender)
InstrumentedType
byteCodeAppender
- The byte code to add to the type initializer.public TypeDescription detach()
InstrumentedType
TypeDescription
interface. This allows
for a potential compression of the representation of this
instrumented type.this
instrumented type.public TypeDescription getSupertype()
TypeDescription
null
if type does not have a super type as for the
Object
type.public TypeList getInterfaces()
TypeDescription
public String getName()
NamedElement
public int getModifiers()
ModifierReviewable
public AnnotationList getDeclaredAnnotations()
AnnotatedCodeElement
public AnnotationList getInheritedAnnotations()
TypeDescription
getInheritedAnnotations
in interface TypeDescription
getInheritedAnnotations
in class TypeDescription.AbstractTypeDescription
Copyright © 2014–2015. All rights reserved.