Package net.bytebuddy.pool
Class TypePool.Default.LazyTypeDescription.MethodToken
- java.lang.Object
-
- net.bytebuddy.pool.TypePool.Default.LazyTypeDescription.MethodToken
-
- Enclosing class:
- TypePool.Default.LazyTypeDescription
@Enhance protected static class TypePool.Default.LazyTypeDescription.MethodToken extends java.lang.Object
A token for representing collected data on a method.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
TypePool.Default.LazyTypeDescription.MethodToken.ParameterToken
A token representing a method's parameter.
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>
annotationTokens
A list of annotation tokens that are present on the represented method.private AnnotationValue<?,?>
defaultValue
The default value of this method ornull
if there is no such value.private java.lang.String
descriptor
The descriptor of the represented method.private java.lang.String[]
exceptionName
An array of internal names of the exceptions of the represented method ornull
if there are no such exceptions.private java.util.Map<java.lang.Integer,java.util.Map<java.lang.String,java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>>>
exceptionTypeAnnotationTokens
A mapping of the exception types' type annotation tokens by their indices.private java.lang.String
genericSignature
The methods's generic signature as found in the class file ornull
if the method is not generic.private int
modifiers
The modifiers of the represented method.private java.lang.String
name
The internal name of the represented method.private java.util.Map<java.lang.Integer,java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>>
parameterAnnotationTokens
A map of parameter indices to tokens that represent their annotations.private java.util.List<TypePool.Default.LazyTypeDescription.MethodToken.ParameterToken>
parameterTokens
A list of tokens describing meta data of the method's parameters.private java.util.Map<java.lang.Integer,java.util.Map<java.lang.String,java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>>>
parameterTypeAnnotationTokens
A mapping of the parameter types' type annotation tokens by their indices.private java.util.Map<java.lang.String,java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>>
receiverTypeAnnotationTokens
A mapping of the receiver type's annotation tokens.private java.util.Map<java.lang.String,java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>>
returnTypeAnnotationTokens
A mapping of the return type's type variable tokens.private TypePool.Default.LazyTypeDescription.GenericTypeToken.Resolution.ForMethod
signatureResolution
The generic type resolution of this method.private java.util.Map<java.lang.Integer,java.util.Map<java.lang.String,java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>>>
typeVariableAnnotationTokens
A mapping of the type variables' type annotation tokens by their indices.private java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.util.Map<java.lang.String,java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>>>>
typeVariableBoundAnnotationTokens
A mapping of the type variables' type bounds' type annotation tokens by their indices and each variable's index.
-
Constructor Summary
Constructors Modifier Constructor Description protected
MethodToken(java.lang.String name, int modifiers, java.lang.String descriptor, java.lang.String genericSignature, java.lang.String[] exceptionName, java.util.Map<java.lang.Integer,java.util.Map<java.lang.String,java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>>> typeVariableAnnotationTokens, java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.util.Map<java.lang.String,java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>>>> typeVariableBoundAnnotationTokens, java.util.Map<java.lang.String,java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>> returnTypeAnnotationTokens, java.util.Map<java.lang.Integer,java.util.Map<java.lang.String,java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>>> parameterTypeAnnotationTokens, java.util.Map<java.lang.Integer,java.util.Map<java.lang.String,java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>>> exceptionTypeAnnotationTokens, java.util.Map<java.lang.String,java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>> receiverTypeAnnotationTokens, java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken> annotationTokens, java.util.Map<java.lang.Integer,java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>> parameterAnnotationTokens, java.util.List<TypePool.Default.LazyTypeDescription.MethodToken.ParameterToken> parameterTokens, AnnotationValue<?,?> defaultValue)
Creates a new method token.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private MethodDescription.InDefinedShape
toMethodDescription(TypePool.Default.LazyTypeDescription lazyTypeDescription)
Transforms this method token to a method description that is attached to a lazy type description.
-
-
-
Field Detail
-
name
private final java.lang.String name
The internal name of the represented method.
-
modifiers
private final int modifiers
The modifiers of the represented method.
-
descriptor
private final java.lang.String descriptor
The descriptor of the represented method.
-
genericSignature
private final java.lang.String genericSignature
The methods's generic signature as found in the class file ornull
if the method is not generic.
-
signatureResolution
private final TypePool.Default.LazyTypeDescription.GenericTypeToken.Resolution.ForMethod signatureResolution
The generic type resolution of this method.
-
exceptionName
private final java.lang.String[] exceptionName
An array of internal names of the exceptions of the represented method ornull
if there are no such exceptions.
-
typeVariableAnnotationTokens
private final java.util.Map<java.lang.Integer,java.util.Map<java.lang.String,java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>>> typeVariableAnnotationTokens
A mapping of the type variables' type annotation tokens by their indices.
-
typeVariableBoundAnnotationTokens
private final java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.util.Map<java.lang.String,java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>>>> typeVariableBoundAnnotationTokens
A mapping of the type variables' type bounds' type annotation tokens by their indices and each variable's index.
-
returnTypeAnnotationTokens
private final java.util.Map<java.lang.String,java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>> returnTypeAnnotationTokens
A mapping of the return type's type variable tokens.
-
parameterTypeAnnotationTokens
private final java.util.Map<java.lang.Integer,java.util.Map<java.lang.String,java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>>> parameterTypeAnnotationTokens
A mapping of the parameter types' type annotation tokens by their indices.
-
exceptionTypeAnnotationTokens
private final java.util.Map<java.lang.Integer,java.util.Map<java.lang.String,java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>>> exceptionTypeAnnotationTokens
A mapping of the exception types' type annotation tokens by their indices.
-
receiverTypeAnnotationTokens
private final java.util.Map<java.lang.String,java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>> receiverTypeAnnotationTokens
A mapping of the receiver type's annotation tokens.
-
annotationTokens
private final java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken> annotationTokens
A list of annotation tokens that are present on the represented method.
-
parameterAnnotationTokens
private final java.util.Map<java.lang.Integer,java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>> parameterAnnotationTokens
A map of parameter indices to tokens that represent their annotations.
-
parameterTokens
private final java.util.List<TypePool.Default.LazyTypeDescription.MethodToken.ParameterToken> parameterTokens
A list of tokens describing meta data of the method's parameters.
-
defaultValue
private final AnnotationValue<?,?> defaultValue
The default value of this method ornull
if there is no such value.
-
-
Constructor Detail
-
MethodToken
protected MethodToken(java.lang.String name, int modifiers, java.lang.String descriptor, java.lang.String genericSignature, java.lang.String[] exceptionName, java.util.Map<java.lang.Integer,java.util.Map<java.lang.String,java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>>> typeVariableAnnotationTokens, java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.util.Map<java.lang.String,java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>>>> typeVariableBoundAnnotationTokens, java.util.Map<java.lang.String,java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>> returnTypeAnnotationTokens, java.util.Map<java.lang.Integer,java.util.Map<java.lang.String,java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>>> parameterTypeAnnotationTokens, java.util.Map<java.lang.Integer,java.util.Map<java.lang.String,java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>>> exceptionTypeAnnotationTokens, java.util.Map<java.lang.String,java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>> receiverTypeAnnotationTokens, java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken> annotationTokens, java.util.Map<java.lang.Integer,java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>> parameterAnnotationTokens, java.util.List<TypePool.Default.LazyTypeDescription.MethodToken.ParameterToken> parameterTokens, AnnotationValue<?,?> defaultValue)
Creates a new method token.- Parameters:
name
- The name of the method.modifiers
- The modifiers of the represented method.descriptor
- The descriptor of the represented method.genericSignature
- The methods's generic signature as found in the class file ornull
if the method is not generic.exceptionName
- An array of internal names of the exceptions of the represented method ornull
if there are no such exceptions.typeVariableAnnotationTokens
- A mapping of the type variables' type annotation tokens by their indices.typeVariableBoundAnnotationTokens
- A mapping of the type variables' type bounds' type annotation tokens by their index and each variable's index.returnTypeAnnotationTokens
- A mapping of the return type's type variable tokens.parameterTypeAnnotationTokens
- A mapping of the parameter types' type annotation tokens by their indices.exceptionTypeAnnotationTokens
- A mapping of the exception types' type annotation tokens by their indices.receiverTypeAnnotationTokens
- A mapping of the receiver type's annotation tokens.annotationTokens
- A list of annotation tokens that are present on the represented method.parameterAnnotationTokens
- A map of parameter indices to tokens that represent their annotations.parameterTokens
- A list of tokens describing meta data of the method's parameters.defaultValue
- The default value of this method ornull
if there is no such value.
-
-
Method Detail
-
toMethodDescription
private MethodDescription.InDefinedShape toMethodDescription(TypePool.Default.LazyTypeDescription lazyTypeDescription)
Transforms this method token to a method description that is attached to a lazy type description.- Parameters:
lazyTypeDescription
- The lazy type description to attach this method description to.- Returns:
- A method description representing this method token.
-
-