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

edu.berkeley.guir.lib.introspect
Class JTreeIntrospectHandler

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

public class JTreeIntrospectHandler
extends DefaultIntrospectHandler

Introspect an object's values in a JTree. See Introspect.parseObject(Object, IntrospectHandler).

Here is an example of the introspection debugging:

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
JTreeIntrospectHandler()
          Creates an empty object.
 
Method Summary
 void displayJTree()
          Just display the tree.
 JTree getJTree()
          Get a reference to the JTree.
 void onObject(int depth, Field f, Object obj)
           
 void onRoot(Object obj)
          Start traversal.
protected  void output(int depth, Field f, String str)
          All primitives get redirected here.
 boolean shouldRecurse(int depth, int mods, Class type, Object obj)
          Don't recurse unless it is on the initial object (depth 0).
protected  String toString(Object obj)
          Convert value to String.
 
Methods inherited from class edu.berkeley.guir.lib.introspect.DefaultIntrospectHandler
onArray, onBoolean, onBooleanArr, onByte, onByteArr, onChar, onCharArr, onDouble, onDoubleArr, onFloat, onFloatArr, onInt, onIntArr, onLong, onLongArr, onNull, onObjectArr, onShort, onShortArr, toString, toString, toString, toString, toString, toString, toString, toString, toString, toString, toString, toString, toString, toString, toString, toString, toString
 
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

JTreeIntrospectHandler

public JTreeIntrospectHandler()
Creates an empty object.
Method Detail

toString

protected String toString(Object obj)
Description copied from class: DefaultIntrospectHandler
Convert value to String.
Overrides:
toString in class DefaultIntrospectHandler

getJTree

public JTree getJTree()
Get a reference to the JTree.

displayJTree

public void displayJTree()
Just display the tree.

output

protected void output(int depth,
                      Field f,
                      String str)
All primitives get redirected here.
Overrides:
output in class DefaultIntrospectHandler

onRoot

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

onObject

public void onObject(int depth,
                     Field f,
                     Object obj)
Overrides:
onObject in class DefaultIntrospectHandler
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.

shouldRecurse

public boolean shouldRecurse(int depth,
                             int mods,
                             Class type,
                             Object obj)
Don't recurse unless it is on the initial object (depth 0).

Copyright Information