|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectharpoon.Util.HClassUtil
public abstract class HClassUtil
HClassUtil
contains various useful methods for dealing with
HClasses that do not seem to belong with the standard HClass methods.
Constructor Summary | |
---|---|
HClassUtil()
|
Method Summary | |
---|---|
static HClass |
arrayClass(Linker linker,
HClass hc,
int dims)
Make an n-dimensional array class from the given component class. |
static HClass |
baseClass(HClass hc)
Return the ultimate component type of an array (that is, after all array dimensions have been stripped off). |
static HClass |
commonInterface(HClass a,
HClass b)
Find and return the first common superinterface of a pair of interfaces. |
static HClass |
commonParent(HClass a,
HClass b)
Find a class which is a common parent of both supplied classes. |
static HClass |
commonSuper(HClass a,
HClass b)
Find and return the first common superclass of a pair of classes. |
static int |
dims(HClass hc)
Count the number of dimensions of an array type. |
static HClass[] |
parents(HClass hc)
Create an array describing the inheritance of class hc. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HClassUtil()
Method Detail |
---|
public static final int dims(HClass hc)
public static final HClass baseClass(HClass hc)
hc
if hc
is not an
array, otherwise a component class c
where
c
is not an array.public static final HClass arrayClass(Linker linker, HClass hc, int dims)
dims
is the number of array dimensions
to add.
public static final HClass[] parents(HClass hc)
public static final HClass commonSuper(HClass a, HClass b)
a
and b
must be primitive or simple object types.
public static final HClass commonInterface(HClass a, HClass b)
public static final HClass commonParent(HClass a, HClass b)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |