UC Berkeley Group for User Interface Research
Updated November 17, 2000

edu.berkeley.guir.lib.introspect
Class IntrospectLib

java.lang.Object
  |
  +--edu.berkeley.guir.lib.introspect.IntrospectLib
All Implemented Interfaces:
IntrospectConstants

public class IntrospectLib
extends Object
implements IntrospectConstants

Library of utilities for introspection.

This software is distributed under the Berkeley Software License.

 Revisions:  - GUIRLib-v1.0-1.0.0, May 17 2000, JH
               Created class
             - GUIRLib-v1.2-1.0.0, Jun 22 2000, JH
               Touched for GUIRLib release
             - GUIRLib-v1.3-1.0.0, Aug 11 2000, JH
               Touched for GUIRLib release
             - GUIRLib-v1.4-1.0.0, Aug 31 2000, JH
               Touched for GUIRLib release
 

Since:
JDK1.3
Version:
GUIRLib-v1.4-1.0.0, Aug 31 2000
Author:
Jason Hong ( jasonh@cs.berkeley.edu )

Fields inherited from interface edu.berkeley.guir.lib.introspect.IntrospectConstants
CL_BOOLEAN, CL_BOOLEAN_ARR, CL_BYTE, CL_BYTE_ARR, CL_CHAR, CL_CHAR_ARR, CL_DOUBLE, CL_DOUBLE_ARR, CL_FLOAT, CL_FLOAT_ARR, CL_INT, CL_INT_ARR, CL_LONG, CL_LONG_ARR, CL_SHORT, CL_SHORT_ARR, CL_STRING, CL_STRINGBUFFER
 
Method Summary
static List getAllFields(Class cl)
          Get all fields that belong to this class, traversing up the inheritance chain if necessary.
static String getArrayStringName(Class type)
          Convert an array class type into a String.
static String getModString(int mods)
          Get a String for modifiers.
static String getTypeString(Class cl)
          Convert a field into a human-readable type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAllFields

public static List getAllFields(Class cl)
Get all fields that belong to this class, traversing up the inheritance chain if necessary.

getModString

public static String getModString(int mods)
Get a String for modifiers.

getTypeString

public static String getTypeString(Class cl)
Convert a field into a human-readable type.

getArrayStringName

public static String getArrayStringName(Class type)
Convert an array class type into a String. Also handles arrays of arrays.
 [Ljava.lang.String;   String[]
 [Z                    boolean[]
 [C                    char[]
 [B                    byte[]
 [S                    short[]
 [I                    int[]
 [J                    long[]
 [F                    float[]
 [D                    double[]

 [[Ljava.lang.String;  String[][]
 [[I                   int[][]
 

Copyright Information