Package net.bytebuddy.description.method
Class ParameterList.ForLoadedExecutable<T>
java.lang.Object
java.util.AbstractCollection<ParameterDescription.InDefinedShape>
java.util.AbstractList<ParameterDescription.InDefinedShape>
net.bytebuddy.matcher.FilterableList.AbstractBase<ParameterDescription.InDefinedShape,ParameterList<ParameterDescription.InDefinedShape>>
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:
Iterable<ParameterDescription.InDefinedShape>,Collection<ParameterDescription.InDefinedShape>,List<ParameterDescription.InDefinedShape>,SequencedCollection<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 interfaceA dispatcher for creating descriptions of parameter lists and for evaluating the size of anjava.lang.reflect.Executable's parameters.protected static classDescribes the list ofConstructorparameters on a modern VM.protected static classRepresents a list of constructor parameters on virtual machines where thejava.lang.reflect.Parametertype is not available.protected static classRepresents a list of method parameters on virtual machines where thejava.lang.reflect.Parametertype is not available.protected static classDescribes 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
FieldsModifier and TypeFieldDescriptionprotected final TThe executable for which a parameter list is represented.protected static final ParameterList.ForLoadedExecutable.ExecutableThe dispatcher used creating parameter list instances and for accessingjava.lang.reflect.Executableinstances.The parameter annotation source to query.Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedForLoadedExecutable(T executable, ParameterDescription.ForLoadedParameter.ParameterAnnotationSource parameterAnnotationSource) Creates a new description for a loaded executable. -
Method Summary
Modifier and TypeMethodDescriptionprivate static <T> TdoPrivileged(PrivilegedAction<T> action) A proxy forjava.security.AccessController#doPrivilegedthat 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.intsize()Methods inherited from class net.bytebuddy.description.method.ParameterList.AbstractBase
asDefined, asTokenList, asTypeList, hasExplicitMetaData, wrapMethods inherited from class net.bytebuddy.matcher.FilterableList.AbstractBase
filter, getOnly, subListMethods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, get, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, setMethods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface net.bytebuddy.matcher.FilterableList
filter, getOnly, subListMethods inherited from interface java.util.List
add, add, addAll, addAll, addFirst, addLast, clear, contains, containsAll, equals, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, set, sort, spliterator, toArray, toArray
-
Field Details
-
EXECUTABLE
The dispatcher used creating parameter list instances and for accessingjava.lang.reflect.Executableinstances. -
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#doPrivilegedthat 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:
sizein interfaceCollection<T>- Specified by:
sizein interfaceList<T>- Specified by:
sizein classAbstractCollection<ParameterDescription.InDefinedShape>
-