T
- Method or Constructorprivate abstract static class MethodKey.Parameters<T>
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
private |
Parameters() |
Modifier and Type | Method and Description |
---|---|
private java.util.LinkedList<T> |
getApplicables(java.util.List<T> methods,
java.lang.Class<?>[] classes)
Returns all methods that are applicable to actual argument types.
|
private T |
getMostSpecific(java.util.List<T> methods,
java.lang.Class<?>[] classes)
Gets the most specific method that is applicable to actual argument types.
|
protected abstract java.lang.Class<?>[] |
getParameterTypes(T app)
Extract the parameter types from its applicable argument.
|
private boolean |
isApplicable(T method,
java.lang.Class<?>[] classes)
Returns true if the supplied method is applicable to actual
argument types.
|
private boolean |
isConvertible(java.lang.Class<?> formal,
java.lang.Class<?> actual,
boolean possibleVarArg) |
private boolean |
isStrictConvertible(java.lang.Class<?> formal,
java.lang.Class<?> actual,
boolean possibleVarArg) |
private int |
moreSpecific(java.lang.Class<?>[] c1,
java.lang.Class<?>[] c2)
Determines which method signature (represented by a class array) is more
specific.
|
protected abstract java.lang.Class<?>[] getParameterTypes(T app)
app
- a method or constructorprivate T getMostSpecific(java.util.List<T> methods, java.lang.Class<?>[] classes)
methods
- a list of methods.classes
- list of argument types.MethodKey.AmbiguousException
- if there is more than one.private int moreSpecific(java.lang.Class<?>[] c1, java.lang.Class<?>[] c2)
c1
- first signature to comparec2
- second signature to compareprivate java.util.LinkedList<T> getApplicables(java.util.List<T> methods, java.lang.Class<?>[] classes)
methods
- list of all candidate methodsclasses
- the actual types of the argumentsprivate boolean isApplicable(T method, java.lang.Class<?>[] classes)
method
- method that will be calledclasses
- arguments to methodprivate boolean isConvertible(java.lang.Class<?> formal, java.lang.Class<?> actual, boolean possibleVarArg)
formal
- the formal parameter type to which the actual
parameter type should be convertibleactual
- the actual parameter type.possibleVarArg
- whether or not we're dealing with the last parameter
in the method declarationMethodKey.isInvocationConvertible(Class, Class, boolean)
private boolean isStrictConvertible(java.lang.Class<?> formal, java.lang.Class<?> actual, boolean possibleVarArg)
formal
- the formal parameter type to which the actual
parameter type should be convertibleactual
- the actual parameter type.possibleVarArg
- whether or not we're dealing with the last parameter
in the method declarationMethodKey.isStrictInvocationConvertible(Class, Class, boolean)