public static class ReflectionSupport.ParameterSignature extends ArrayList<Class<?>>
modCount
Constructor and Description |
---|
ParameterSignature()
Create an empty parameter list signature.
|
ParameterSignature(Class<?>... parameterTypes)
Create a parameter list signature from an array (or variable
argument list) of Class values.
|
ParameterSignature(Constructor<?> constructor)
Create a parameter list signature corresponding to the declared
parameter list of a Constructor.
|
ParameterSignature(Method method)
Create a parameter list signature corresponding to the declared
parameter list of a Method.
|
ParameterSignature(Object... parameters)
Create a parameter list signature from an array (or variable
argument list) of actuals.
|
Modifier and Type | Method and Description |
---|---|
ReflectionSupport.ParameterAcceptanceCategory |
acceptanceCategory(ReflectionSupport.ParameterSignature typesOfActuals)
Determine if the given set of actual argument types would be
accepted by a method with this parameter signature.
|
boolean |
accepts(Object... actuals)
Determine if the given set of actual parameter values would be
accepted by a method with this parameter signature.
|
boolean |
accepts(ReflectionSupport.ParameterSignature typesOfActuals)
Determine if the given set of actual argument types would be
accepted by a method with this parameter signature.
|
Class<?>[] |
asArray()
Retrieve a plain array containing the parameter types in
this signature.
|
boolean |
isMoreSpecificThan(ReflectionSupport.ParameterSignature other)
Determine if this parameter signature is more specific than the
given parameter signature.
|
boolean |
isSubSignatureOf(ReflectionSupport.ParameterSignature other)
Determine if this signature is a subsignature of the other one,
as defined by Section 8.4.2 of the JLS.
|
String |
toString() |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
equals, hashCode
containsAll
finalize, getClass, notify, notifyAll, wait, wait, wait
containsAll, equals, hashCode
parallelStream, stream
public ParameterSignature()
public ParameterSignature(Method method)
method
- The method whose signature will be represented.public ParameterSignature(Constructor<?> constructor)
constructor
- The constructor whose signature will be
represented.public ParameterSignature(Class<?>... parameterTypes)
parameterTypes
- The sequence of Class objects representing
the types of the parameters in this signature.public ParameterSignature(Object... parameters)
parameters
- A sequence of actual parameters from which
the types are deduced. Any nulls in the list are treated to
be of type Object.public boolean accepts(ReflectionSupport.ParameterSignature typesOfActuals)
typesOfActuals
- The types of the actual arguments to check
against.public ReflectionSupport.ParameterAcceptanceCategory acceptanceCategory(ReflectionSupport.ParameterSignature typesOfActuals)
typesOfActuals
- The types of the actual arguments to check
against.public boolean accepts(Object... actuals)
actuals
- The types of the actual arguments to check
against.public boolean isSubSignatureOf(ReflectionSupport.ParameterSignature other)
other
- The parameter signature to check against.public boolean isMoreSpecificThan(ReflectionSupport.ParameterSignature other)
other
- The other parameter signature to check against.public Class<?>[] asArray()
public String toString()
toString
in class AbstractCollection<Class<?>>