Package net.bytebuddy.pool
Class TypePool.Default.LazyTypeDescription.MethodToken
java.lang.Object
net.bytebuddy.pool.TypePool.Default.LazyTypeDescription.MethodToken
- Enclosing class:
TypePool.Default.LazyTypeDescription
A token for representing collected data on a method.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
A token representing a method's parameter. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List
<TypePool.Default.LazyTypeDescription.AnnotationToken> A list of annotation tokens that are present on the represented method.private final AnnotationValue
<?, ?> The default value of this method ornull
if there is no such value.private final String
The descriptor of the represented method.private final String[]
An array of internal names of the exceptions of the represented method ornull
if there are no such exceptions.A mapping of the exception types' type annotation tokens by their indices.private final String
The methods's generic signature as found in the class file ornull
if the method is not generic.private final int
The modifiers of the represented method.private final String
The internal name of the represented method.private final Map
<Integer, List<TypePool.Default.LazyTypeDescription.AnnotationToken>> A map of parameter indices to tokens that represent their annotations.A list of tokens describing meta data of the method's parameters.A mapping of the parameter types' type annotation tokens by their indices.private final Map
<String, List<TypePool.Default.LazyTypeDescription.AnnotationToken>> A mapping of the receiver type's annotation tokens.private final Map
<String, List<TypePool.Default.LazyTypeDescription.AnnotationToken>> A mapping of the return type's type variable tokens.The generic type resolution of this method.A mapping of the type variables' type annotation tokens by their indices.private final Map
<Integer, Map<Integer, Map<String, List<TypePool.Default.LazyTypeDescription.AnnotationToken>>>> A mapping of the type variables' type bounds' type annotation tokens by their indices and each variable's index. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
MethodToken
(String name, int modifiers, String descriptor, String genericSignature, String[] exceptionName, Map<Integer, Map<String, List<TypePool.Default.LazyTypeDescription.AnnotationToken>>> typeVariableAnnotationTokens, Map<Integer, Map<Integer, Map<String, List<TypePool.Default.LazyTypeDescription.AnnotationToken>>>> typeVariableBoundAnnotationTokens, Map<String, List<TypePool.Default.LazyTypeDescription.AnnotationToken>> returnTypeAnnotationTokens, Map<Integer, Map<String, List<TypePool.Default.LazyTypeDescription.AnnotationToken>>> parameterTypeAnnotationTokens, Map<Integer, Map<String, List<TypePool.Default.LazyTypeDescription.AnnotationToken>>> exceptionTypeAnnotationTokens, Map<String, List<TypePool.Default.LazyTypeDescription.AnnotationToken>> receiverTypeAnnotationTokens, List<TypePool.Default.LazyTypeDescription.AnnotationToken> annotationTokens, Map<Integer, List<TypePool.Default.LazyTypeDescription.AnnotationToken>> parameterAnnotationTokens, List<TypePool.Default.LazyTypeDescription.MethodToken.ParameterToken> parameterTokens, AnnotationValue<?, ?> defaultValue) Creates a new method token. -
Method Summary
Modifier and TypeMethodDescriptionprivate MethodDescription.InDefinedShape
toMethodDescription
(TypePool.Default.LazyTypeDescription lazyTypeDescription) Transforms this method token to a method description that is attached to a lazy type description.
-
Field Details
-
name
The internal name of the represented method. -
modifiers
private final int modifiersThe 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. -
signatureResolution
private final TypePool.Default.LazyTypeDescription.GenericTypeToken.Resolution.ForMethod signatureResolutionThe generic type resolution of this method. -
exceptionName
An array of internal names of the exceptions of the represented method ornull
if there are no such exceptions. -
typeVariableAnnotationTokens
private final Map<Integer,Map<String, typeVariableAnnotationTokensList<TypePool.Default.LazyTypeDescription.AnnotationToken>>> A mapping of the type variables' type annotation tokens by their indices. -
typeVariableBoundAnnotationTokens
private final Map<Integer,Map<Integer, typeVariableBoundAnnotationTokensMap<String, List<TypePool.Default.LazyTypeDescription.AnnotationToken>>>> A mapping of the type variables' type bounds' type annotation tokens by their indices and each variable's index. -
returnTypeAnnotationTokens
private final Map<String,List<TypePool.Default.LazyTypeDescription.AnnotationToken>> returnTypeAnnotationTokensA mapping of the return type's type variable tokens. -
parameterTypeAnnotationTokens
private final Map<Integer,Map<String, parameterTypeAnnotationTokensList<TypePool.Default.LazyTypeDescription.AnnotationToken>>> A mapping of the parameter types' type annotation tokens by their indices. -
exceptionTypeAnnotationTokens
private final Map<Integer,Map<String, exceptionTypeAnnotationTokensList<TypePool.Default.LazyTypeDescription.AnnotationToken>>> A mapping of the exception types' type annotation tokens by their indices. -
receiverTypeAnnotationTokens
private final Map<String,List<TypePool.Default.LazyTypeDescription.AnnotationToken>> receiverTypeAnnotationTokensA mapping of the receiver type's annotation tokens. -
annotationTokens
A list of annotation tokens that are present on the represented method. -
parameterAnnotationTokens
private final Map<Integer,List<TypePool.Default.LazyTypeDescription.AnnotationToken>> parameterAnnotationTokensA 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.
-
-
Constructor Details
-
MethodToken
protected MethodToken(String name, int modifiers, String descriptor, @MaybeNull String genericSignature, @MaybeNull String[] exceptionName, Map<Integer, Map<String, List<TypePool.Default.LazyTypeDescription.AnnotationToken>>> typeVariableAnnotationTokens, Map<Integer, Map<Integer, Map<String, List<TypePool.Default.LazyTypeDescription.AnnotationToken>>>> typeVariableBoundAnnotationTokens, Map<String, List<TypePool.Default.LazyTypeDescription.AnnotationToken>> returnTypeAnnotationTokens, Map<Integer, Map<String, List<TypePool.Default.LazyTypeDescription.AnnotationToken>>> parameterTypeAnnotationTokens, Map<Integer, Map<String, List<TypePool.Default.LazyTypeDescription.AnnotationToken>>> exceptionTypeAnnotationTokens, Map<String, List<TypePool.Default.LazyTypeDescription.AnnotationToken>> receiverTypeAnnotationTokens, List<TypePool.Default.LazyTypeDescription.AnnotationToken> annotationTokens, Map<Integer, List<TypePool.Default.LazyTypeDescription.AnnotationToken>> parameterAnnotationTokens, List<TypePool.Default.LazyTypeDescription.MethodToken.ParameterToken> parameterTokens, @MaybeNull 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 Details
-
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.
-