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.Executable
that 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. aMethod
orConstructor
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interface
ParameterList.ForLoadedExecutable.Dispatcher
A dispatcher for creating descriptions of parameter lists and for evaluating the size of anjava.lang.reflect.Executable
's parameters.protected static class
ParameterList.ForLoadedExecutable.OfConstructor
Describes the list ofConstructor
parameters on a modern VM.protected static class
ParameterList.ForLoadedExecutable.OfLegacyVmConstructor
Represents a list of constructor parameters on virtual machines where thejava.lang.reflect.Parameter
type is not available.protected static class
ParameterList.ForLoadedExecutable.OfLegacyVmMethod
Represents a list of method parameters on virtual machines where thejava.lang.reflect.Parameter
type is not available.protected static class
ParameterList.ForLoadedExecutable.OfMethod
Describes the list ofMethod
parameters 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.Dispatcher
DISPATCHER
The dispatcher used creating parameter list instances and for accessingjava.lang.reflect.Executable
instances.protected T
executable
The executable for which a parameter list is represented.protected ParameterDescription.ForLoadedParameter.ParameterAnnotationSource
parameterAnnotationSource
The parameter annotation source to query.
-
Constructor Summary
Constructors Modifier Constructor Description protected
ForLoadedExecutable(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
.int
size()
-
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.Executable
instances.
-
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:
size
in interfacejava.util.Collection<T>
- Specified by:
size
in interfacejava.util.List<T>
- Specified by:
size
in classjava.util.AbstractCollection<ParameterDescription.InDefinedShape>
-
-