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:
Iterable<ParameterDescription.InDefinedShape>
,Collection<ParameterDescription.InDefinedShape>
,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. a
Method
or Constructor
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static interface
A dispatcher for creating descriptions of parameter lists and for evaluating the size of anjava.lang.reflect.Executable
's parameters.protected static class
Describes the list ofConstructor
parameters on a modern VM.protected static class
Represents a list of constructor parameters on virtual machines where thejava.lang.reflect.Parameter
type is not available.protected static class
Represents a list of method parameters on virtual machines where thejava.lang.reflect.Parameter
type is not available.protected static class
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
FieldsModifier and TypeFieldDescriptionprotected final T
The executable for which a parameter list is represented.protected static final ParameterList.ForLoadedExecutable.Executable
The dispatcher used creating parameter list instances and for accessingjava.lang.reflect.Executable
instances.The parameter annotation source to query.Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ForLoadedExecutable
(T executable, ParameterDescription.ForLoadedParameter.ParameterAnnotationSource parameterAnnotationSource) Creates a new description for a loaded executable. -
Method Summary
Modifier and TypeMethodDescriptionprivate static <T> T
doPrivileged
(PrivilegedAction<T> action) A proxy forjava.security.AccessController#doPrivileged
that is activated if available.of
(Constructor<?> constructor) Creates a new list that describes the parameters of the givenConstructor
.of
(Constructor<?> constructor, ParameterDescription.ForLoadedParameter.ParameterAnnotationSource parameterAnnotationSource) Creates a new list that describes the parameters of the givenConstructor
.Creates a new list that describes the parameters of the givenMethod
.of
(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 java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface net.bytebuddy.matcher.FilterableList
filter, getOnly, subList
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, sort, spliterator, toArray, toArray
-
Field Details
-
EXECUTABLE
The dispatcher used creating parameter list instances and for accessingjava.lang.reflect.Executable
instances. -
executable
The executable for which a parameter list is represented. -
parameterAnnotationSource
protected final ParameterDescription.ForLoadedParameter.ParameterAnnotationSource parameterAnnotationSourceThe parameter annotation source to query.
-
-
Constructor Details
-
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 Details
-
doPrivileged
A proxy forjava.security.AccessController#doPrivileged
that is activated if available.- Type Parameters:
T
- The type of the action's resolved value.- Parameters:
action
- The action to execute from a privileged context.- Returns:
- The action's resolved value.
-
of
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(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
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(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 interfaceCollection<T>
- Specified by:
size
in interfaceList<T>
- Specified by:
size
in classAbstractCollection<ParameterDescription.InDefinedShape>
-