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

edu.berkeley.guir.lib.introspect
Class DefaultIntrospectHandler

java.lang.Object
  |
  +--edu.berkeley.guir.lib.introspect.IntrospectHandler
        |
        +--edu.berkeley.guir.lib.introspect.DefaultIntrospectHandler
All Implemented Interfaces:
IntrospectConstants
Direct Known Subclasses:
JTreeIntrospectHandler, PrintIntrospectHandler, XMLIntrospectHandler

public abstract class DefaultIntrospectHandler
extends IntrospectHandler

Default handler for introspection debugging. See Introspect.parseObject(Object, IntrospectHandler).

This software is distributed under the Berkeley Software License.

 Revisions:  - GUIRLib-v1.0-1.0.0, Apr 25 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
 
Constructor Summary
DefaultIntrospectHandler()
           
DefaultIntrospectHandler(IntrospectFilter f)
           
 
Method Summary
 void onArray(int depth, Field f, Object arr)
           
 void onBoolean(int depth, Field f, boolean val)
           
protected  void onBooleanArr(int depth, Field f, boolean[] arr)
           
 void onByte(int depth, Field f, byte val)
           
protected  void onByteArr(int depth, Field f, byte[] arr)
           
 void onChar(int depth, Field f, char val)
           
protected  void onCharArr(int depth, Field f, char[] arr)
           
 void onDouble(int depth, Field f, double val)
           
protected  void onDoubleArr(int depth, Field f, double[] arr)
           
 void onFloat(int depth, Field f, float val)
           
protected  void onFloatArr(int depth, Field f, float[] arr)
           
 void onInt(int depth, Field f, int val)
           
protected  void onIntArr(int depth, Field f, int[] arr)
           
 void onLong(int depth, Field f, long val)
           
protected  void onLongArr(int depth, Field f, long[] arr)
           
 void onNull(int depth, Field f)
          Rather than calling onObject or onArray, calls this if value is null.
 void onObject(int depth, Field f, Object obj)
           
protected  void onObjectArr(int depth, Field f, Object[] arr)
          Multidimensional arrays are sent here too.
 void onRoot(Object obj)
          Start traversal.
 void onShort(int depth, Field f, short val)
           
protected  void onShortArr(int depth, Field f, short[] arr)
           
protected abstract  void output(int depth, Field f, String strVal)
          All of the output is redirected here.
protected  String toString(boolean val)
          Convert value to String.
protected  String toString(boolean[] arr)
           
protected  String toString(byte val)
          Convert value to String.
protected  String toString(byte[] arr)
           
protected  String toString(char val)
          Convert value to String.
protected  String toString(char[] arr)
           
protected  String toString(double val)
          Convert value to String.
protected  String toString(double[] arr)
           
protected  String toString(float val)
          Convert value to String.
protected  String toString(float[] arr)
           
protected  String toString(int val)
          Convert value to String.
protected  String toString(int[] arr)
           
protected  String toString(long val)
          Convert value to String.
protected  String toString(long[] arr)
           
protected  String toString(Object val)
          Convert value to String.
protected  String toString(Object[] arr)
          Handles multi-dimensional arrays too.
protected  String toString(short val)
          Convert value to String.
protected  String toString(short[] arr)
           
 
Methods inherited from class edu.berkeley.guir.lib.introspect.IntrospectHandler
acceptField, getFilter, onException, setFilter, shouldRecurse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultIntrospectHandler

public DefaultIntrospectHandler()

DefaultIntrospectHandler

public DefaultIntrospectHandler(IntrospectFilter f)
Method Detail

toString

protected String toString(boolean val)
Convert value to String.

toString

protected String toString(char val)
Convert value to String.

toString

protected String toString(short val)
Convert value to String.

toString

protected String toString(byte val)
Convert value to String.

toString

protected String toString(int val)
Convert value to String.

toString

protected String toString(long val)
Convert value to String.

toString

protected String toString(float val)
Convert value to String.

toString

protected String toString(double val)
Convert value to String.

toString

protected String toString(Object val)
Convert value to String.

toString

protected String toString(boolean[] arr)

toString

protected String toString(char[] arr)

toString

protected String toString(short[] arr)

toString

protected String toString(byte[] arr)

toString

protected String toString(int[] arr)

toString

protected String toString(long[] arr)

toString

protected String toString(float[] arr)

toString

protected String toString(double[] arr)

toString

protected String toString(Object[] arr)
Handles multi-dimensional arrays too.

onBooleanArr

protected void onBooleanArr(int depth,
                            Field f,
                            boolean[] arr)

onCharArr

protected void onCharArr(int depth,
                         Field f,
                         char[] arr)

onShortArr

protected void onShortArr(int depth,
                          Field f,
                          short[] arr)

onByteArr

protected void onByteArr(int depth,
                         Field f,
                         byte[] arr)

onIntArr

protected void onIntArr(int depth,
                        Field f,
                        int[] arr)

onLongArr

protected void onLongArr(int depth,
                         Field f,
                         long[] arr)

onFloatArr

protected void onFloatArr(int depth,
                          Field f,
                          float[] arr)

onDoubleArr

protected void onDoubleArr(int depth,
                           Field f,
                           double[] arr)

onObjectArr

protected void onObjectArr(int depth,
                           Field f,
                           Object[] arr)
Multidimensional arrays are sent here too.

output

protected abstract void output(int depth,
                               Field f,
                               String strVal)
All of the output is redirected here.

onRoot

public void onRoot(Object obj)
Description copied from class: IntrospectHandler
Start traversal.
Overrides:
onRoot in class IntrospectHandler

onObject

public void onObject(int depth,
                     Field f,
                     Object obj)
Overrides:
onObject in class IntrospectHandler
Following copied from class: edu.berkeley.guir.lib.introspect.IntrospectHandler
Parameters:
depth - is the depth of the node in the tree.
field - is the Field information, and is null for the start object.
obj - is the object value, which may or may not be null.

onArray

public void onArray(int depth,
                    Field f,
                    Object arr)
Overrides:
onArray in class IntrospectHandler
Following copied from class: edu.berkeley.guir.lib.introspect.IntrospectHandler
Parameters:
depth - is the depth of the node in the tree.
field - is the Field information.
obj - is the array, which may or may not be null.

onNull

public void onNull(int depth,
                   Field f)
Description copied from class: IntrospectHandler
Rather than calling onObject or onArray, calls this if value is null.
Overrides:
onNull in class IntrospectHandler

onBoolean

public void onBoolean(int depth,
                      Field f,
                      boolean val)
Overrides:
onBoolean in class IntrospectHandler

onChar

public void onChar(int depth,
                   Field f,
                   char val)
Overrides:
onChar in class IntrospectHandler

onInt

public void onInt(int depth,
                  Field f,
                  int val)
Overrides:
onInt in class IntrospectHandler

onLong

public void onLong(int depth,
                   Field f,
                   long val)
Overrides:
onLong in class IntrospectHandler

onFloat

public void onFloat(int depth,
                    Field f,
                    float val)
Overrides:
onFloat in class IntrospectHandler

onDouble

public void onDouble(int depth,
                     Field f,
                     double val)
Overrides:
onDouble in class IntrospectHandler

onShort

public void onShort(int depth,
                    Field f,
                    short val)
Overrides:
onShort in class IntrospectHandler

onByte

public void onByte(int depth,
                   Field f,
                   byte val)
Overrides:
onByte in class IntrospectHandler

Copyright Information