|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectovm.polyd.Utils
public abstract class Utils
A convenience class that implements a few handy utilities.
Utils.Diff
Nested Class Summary | |
---|---|
static class |
Utils.Diff
Used to describe the result of a comparison between two classes or arrays of classes. |
Method Summary | |
---|---|
static Utils.Diff |
classArrayDiff(java.lang.Class[] a,
java.lang.Class[] b)
Compares two arrays of classes. |
static Utils.Diff |
classArrayDiff(java.lang.Class[] a,
java.lang.Class[] b,
java.lang.Class[] cross)
Compares two arrays of classes, and attempts to build an array that is a subclass of both arrays. |
static Utils.Diff |
classDiff(java.lang.Class a,
java.lang.Class b)
Compares two classes. |
static boolean |
isEqualOrSub(java.lang.Class a,
java.lang.Class b)
Compares two classes, and determines whether the first one is equal or a subclass or the second. |
static boolean |
isEqualOrSubArrayNull(java.lang.Class[] a,
java.lang.Class[] b)
Compares two arrays of classes, and determines whether each element of the first is equal or a subclass of the second. |
static int |
isThere(java.lang.Class[] params,
java.lang.reflect.Method[] meth)
Determines whether any of those methods has has a given combination of formal parameters. |
static java.lang.String |
methodString(java.lang.reflect.Method m)
Generates a user-friendly string representation of a method. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Utils.Diff classDiff(java.lang.Class a, java.lang.Class b)
a
- the first class that will be comparedb
- the second class that will be compared
public static Utils.Diff classArrayDiff(java.lang.Class[] a, java.lang.Class[] b)
a
- the first array that will be comparedb
- the second array that will be compared
public static Utils.Diff classArrayDiff(java.lang.Class[] a, java.lang.Class[] b, java.lang.Class[] cross)
If the result of the method is anything but NotCompatible
,
the two arrays of classes will be combined and the
resulting combination stored in the array specified by
the third argument.
The new array will contain the narrowest element of each pair (the class which is a subclass of the other one).
If the result of the method is NotCompatible
,
the data the third array will receive is unspecified.
a
- the first array that will be comparedb
- the second array that will be comparedcross
- the array where the new combination will be stored
public static boolean isEqualOrSub(java.lang.Class a, java.lang.Class b)
a
- the first class that will be comparedb
- the second class that will be compared
public static boolean isEqualOrSubArrayNull(java.lang.Class[] a, java.lang.Class[] b)
The first array can contain null values, which will not be included in the overall comparison.
a
- the first array that will be comparedb
- the second array that will be compared
public static int isThere(java.lang.Class[] params, java.lang.reflect.Method[] meth)
params
- an array of desired parameter classesmeth
- an array of methods
public static java.lang.String methodString(java.lang.reflect.Method m)
m
- the method than needs to be printed
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |