Methods Summary |
---|
public static void | addMethodNamesToVector(java.util.Vector v, java.lang.reflect.Method[] methods)Add method name to vector
for (int i=0; i< methods.length; i++) {
// add method name to vector
v.addElement(methods[i].getName());
}
|
public static void | addMethodNamesToVector(java.util.Vector v, java.lang.reflect.Method[] hMethods, java.lang.reflect.Method[] rMethods)Determine is method parameters are equal.
// add method names to vector for both home and remote interfaces
addMethodNamesToVector(v,hMethods);
addMethodNamesToVector(v,rMethods);
|
public static boolean | methodEquals(java.lang.reflect.Method classMethod, java.lang.reflect.Method intfMethod)returns true if method names, return types and parameters match. Otherwise
it returns false.
return classMethod.getName().equals(intfMethod.getName()) &&
intfMethod.getReturnType().isAssignableFrom(classMethod.getReturnType()) &&
Arrays.equals(classMethod.getParameterTypes(), intfMethod.getParameterTypes());
|
public static boolean | stringArrayEquals(java.lang.String[] s1, java.lang.String[] s2)Determine is method parameters are equal.
if (s1 == null && s2 == null) {
return true;
}
if (s1 == null && s2 != null) {
return false;
}
if (s2 == null && s1 != null) {
return false;
}
if (s1.length == s2.length) {
for (int i = 0; i < s1.length; i++) {
if (!s1[i].equals(s2[i])) {
return false;
}
}
return true;
} else {
return false;
}
|