public class MethodDescription extends Object
"infinite".DISTANCE_PRIMITIVE_OBJECT.DISTANCE_NUMBERS.DISTANCE_FUTURE.Tuple and QiStruct is DISTANCE_TUPLE_STRUCT"infinite"| Method Java | Distance |
|---|---|
| String call(int i) | 0 = 0 (Distance String and 's') + 0 (Distance int and 'i') |
| String call(Integer i) | 1 = 0 (Distance String and 's') + 1 (Distance Integer and 'i') |
| Future<String> call(int i) | 100 = 100 (Distance Future<String> and 's') + 0 (Distance int and 'i') |
| Future<String> call(Integer i) | 101 = 100 (Distance Future<String> and 's') + 1 (Distance Integer and 'i') |
| Constructor and Description |
|---|
MethodDescription(String methodName,
Class<?> returnType,
Class<?>[] parametersType)
Create method description.
|
| Modifier and Type | Method and Description |
|---|---|
int |
distance(Method method)
Compute the "distance" between the given method with this description.
If "distance" is 0, it means the given method is exactly the method description. If "distance" is Integer.MAX_VALUE, if means the given method is
completely different and incompatible.For other values of "distance" it means the given method is compatible to method description. |
static MethodDescription |
fromJNI(String methodName,
String signatureJNI)
Compute method description with method name and JNI signature.
|
String |
getMethodName()
Method name.
|
Class<?>[] |
getParametersType()
Method parameters types.
|
Class<?> |
getReturnType()
Method return type.
|
String |
toString()
String description for debug purpose
|
public static MethodDescription fromJNI(String methodName, String signatureJNI)
methodName - Method name.signatureJNI - JNI signature.IllegalArgumentException - If signatureJNI not a valid JNI signature.public String getMethodName()
public Class<?> getReturnType()
public Class<?>[] getParametersType()
public int distance(Method method)
Integer.MAX_VALUE, if means the given method is
completely different and incompatible.method - Method to measure the "distance" with.Copyright © 2020. All rights reserved.