Package net.bytebuddy.description.method
Class ParameterList.ForLoadedExecutable<T>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<T>
-
- net.bytebuddy.matcher.FilterableList.AbstractBase<S,ParameterList<S>>
-
- net.bytebuddy.description.method.ParameterList.AbstractBase<ParameterDescription.InDefinedShape>
-
- net.bytebuddy.description.method.ParameterList.ForLoadedExecutable<T>
-
- Type Parameters:
T- The type of thejava.lang.reflect.Executablethat this list represents.
- All Implemented Interfaces:
java.lang.Iterable<ParameterDescription.InDefinedShape>,java.util.Collection<ParameterDescription.InDefinedShape>,java.util.List<ParameterDescription.InDefinedShape>,ParameterList<ParameterDescription.InDefinedShape>,FilterableList<ParameterDescription.InDefinedShape,ParameterList<ParameterDescription.InDefinedShape>>
- Direct Known Subclasses:
ParameterList.ForLoadedExecutable.OfConstructor,ParameterList.ForLoadedExecutable.OfMethod
- Enclosing interface:
- ParameterList<T extends ParameterDescription>
public abstract static class ParameterList.ForLoadedExecutable<T> extends ParameterList.AbstractBase<ParameterDescription.InDefinedShape>
Represents a list of parameters for an executable, i.e. aMethodorConstructor.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interfaceParameterList.ForLoadedExecutable.DispatcherA dispatcher for creating descriptions of parameter lists and for evaluating the size of anjava.lang.reflect.Executable's parameters.protected static classParameterList.ForLoadedExecutable.OfConstructorDescribes the list ofConstructorparameters on a modern VM.protected static classParameterList.ForLoadedExecutable.OfLegacyVmConstructorRepresents a list of constructor parameters on virtual machines where thejava.lang.reflect.Parametertype is not available.protected static classParameterList.ForLoadedExecutable.OfLegacyVmMethodRepresents a list of method parameters on virtual machines where thejava.lang.reflect.Parametertype is not available.protected static classParameterList.ForLoadedExecutable.OfMethodDescribes the list ofMethodparameters on a modern VM.-
Nested classes/interfaces inherited from interface net.bytebuddy.matcher.FilterableList
FilterableList.AbstractBase<T,S extends FilterableList<T,S>>, FilterableList.Empty<T,S extends FilterableList<T,S>>
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.method.ParameterList
ParameterList.AbstractBase<S extends ParameterDescription>, ParameterList.Empty<S extends ParameterDescription>, ParameterList.Explicit<S extends ParameterDescription>, ParameterList.ForLoadedExecutable<T>, ParameterList.ForTokens, ParameterList.TypeSubstituting
-
-
Field Summary
Fields Modifier and Type Field Description private static ParameterList.ForLoadedExecutable.DispatcherDISPATCHERThe dispatcher used creating parameter list instances and for accessingjava.lang.reflect.Executableinstances.protected TexecutableThe executable for which a parameter list is represented.protected ParameterDescription.ForLoadedParameter.ParameterAnnotationSourceparameterAnnotationSourceThe parameter annotation source to query.
-
Constructor Summary
Constructors Modifier Constructor Description protectedForLoadedExecutable(T executable, ParameterDescription.ForLoadedParameter.ParameterAnnotationSource parameterAnnotationSource)Creates a new description for a loaded executable.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ParameterList<ParameterDescription.InDefinedShape>of(java.lang.reflect.Constructor<?> constructor)Creates a new list that describes the parameters of the givenConstructor.static ParameterList<ParameterDescription.InDefinedShape>of(java.lang.reflect.Constructor<?> constructor, ParameterDescription.ForLoadedParameter.ParameterAnnotationSource parameterAnnotationSource)Creates a new list that describes the parameters of the givenConstructor.static ParameterList<ParameterDescription.InDefinedShape>of(java.lang.reflect.Method method)Creates a new list that describes the parameters of the givenMethod.static ParameterList<ParameterDescription.InDefinedShape>of(java.lang.reflect.Method method, ParameterDescription.ForLoadedParameter.ParameterAnnotationSource parameterAnnotationSource)Creates a new list that describes the parameters of the givenMethod.intsize()-
Methods inherited from class net.bytebuddy.description.method.ParameterList.AbstractBase
asDefined, asTokenList, asTypeList, hasExplicitMetaData, wrap
-
Methods inherited from class net.bytebuddy.matcher.FilterableList.AbstractBase
filter, getOnly, subList
-
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, get, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set
-
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.bytebuddy.matcher.FilterableList
filter, getOnly, subList
-
-
-
-
Field Detail
-
DISPATCHER
private static final ParameterList.ForLoadedExecutable.Dispatcher DISPATCHER
The dispatcher used creating parameter list instances and for accessingjava.lang.reflect.Executableinstances.
-
executable
protected final T executable
The executable for which a parameter list is represented.
-
parameterAnnotationSource
protected final ParameterDescription.ForLoadedParameter.ParameterAnnotationSource parameterAnnotationSource
The parameter annotation source to query.
-
-
Constructor Detail
-
ForLoadedExecutable
protected ForLoadedExecutable(T executable, ParameterDescription.ForLoadedParameter.ParameterAnnotationSource parameterAnnotationSource)
Creates a new description for a loaded executable.- Parameters:
executable- The executable for which a parameter list is represented.parameterAnnotationSource- The parameter annotation source to query.
-
-
Method Detail
-
of
public static ParameterList<ParameterDescription.InDefinedShape> of(java.lang.reflect.Constructor<?> constructor)
Creates a new list that describes the parameters of the givenConstructor.- Parameters:
constructor- The constructor for which the parameters should be described.- Returns:
- A list describing the constructor's parameters.
-
of
public static ParameterList<ParameterDescription.InDefinedShape> of(java.lang.reflect.Constructor<?> constructor, ParameterDescription.ForLoadedParameter.ParameterAnnotationSource parameterAnnotationSource)
Creates a new list that describes the parameters of the givenConstructor.- Parameters:
constructor- The constructor for which the parameters should be described.parameterAnnotationSource- The parameter annotation source to query.- Returns:
- A list describing the constructor's parameters.
-
of
public static ParameterList<ParameterDescription.InDefinedShape> of(java.lang.reflect.Method method)
Creates a new list that describes the parameters of the givenMethod.- Parameters:
method- The method for which the parameters should be described.- Returns:
- A list describing the method's parameters.
-
of
public static ParameterList<ParameterDescription.InDefinedShape> of(java.lang.reflect.Method method, ParameterDescription.ForLoadedParameter.ParameterAnnotationSource parameterAnnotationSource)
Creates a new list that describes the parameters of the givenMethod.- Parameters:
method- The method for which the parameters should be described.parameterAnnotationSource- The parameter annotation source to query.- Returns:
- A list describing the method's parameters.
-
size
public int size()
- Specified by:
sizein interfacejava.util.Collection<T>- Specified by:
sizein interfacejava.util.List<T>- Specified by:
sizein classjava.util.AbstractCollection<ParameterDescription.InDefinedShape>
-
-