All Packages Class Hierarchy This Package Previous Next Index
Class harpoon.Util.HClassUtil
java.lang.Object
|
+----harpoon.Util.HClassUtil
- public abstract class HClassUtil
- extends Object
HClassUtil
contains various useful methods for dealing with
HClasses that do not seem to belong with the standard HClass methods.
- Version:
- $Id: HClassUtil.java,v 1.6 1998/10/11 02:37:58 cananian Exp $
- Author:
- C. Scott Ananian <cananian@alumni.princeton.edu>
-
HClassUtil()
-
-
arrayClass(HClass, int)
- Make an n-dimensional array class from the given component class.
-
baseClass(HClass)
- Return the ultimate component type of an array (that is, after
all array dimensions have been stripped off).
-
commonSuper(HClass, HClass)
- Find and return the first common superclass of a pair of classes.
-
dims(HClass)
- Count the number of dimensions of an array type.
-
parents(HClass)
- Create an array describing the inheritance of class hc.
HClassUtil
public HClassUtil()
dims
public static final int dims(HClass hc)
- Count the number of dimensions of an array type.
- Returns:
- 0 for a non-array, n for an n-dimensional array type.
baseClass
public static final HClass baseClass(HClass hc)
- Return the ultimate component type of an array (that is, after
all array dimensions have been stripped off).
- Returns:
- input class
hc
if hc
is not an
array, otherwise a component class c
where
c
is not an array.
arrayClass
public static final HClass arrayClass(HClass hc,
int dims)
- Make an n-dimensional array class from the given component class.
The parameter
dims
is the number of array dimensions
to add.
parents
public static final HClass[] parents(HClass hc)
- Create an array describing the inheritance of class hc.
- Returns:
- an array, where element 0 is the HClass for java.lang.Object,
an the last element is hc.
commonSuper
public static final HClass commonSuper(HClass a,
HClass b)
- Find and return the first common superclass of a pair of classes.
All Packages Class Hierarchy This Package Previous Next Index