tcl.lang
Class ReflectObject
java.lang.Object
tcl.lang.ReflectObject
- All Implemented Interfaces:
- Command, CommandWithDispose, InternalRep
public class ReflectObject
- extends java.lang.Object
- implements InternalRep, CommandWithDispose
A ReflectObject is used to create and access arbitrary Java objects
using the Java Reflection API. It wraps around a Java object (i.e.,
an instance of any Java class) and expose it to Tcl scripts. The
object is registered inside the interpreter and is given a string
name. Tcl scripts can manipulate this object as long as the the
reference count of the object is greater than zero.
Field Summary |
protected static java.lang.String |
CMD_PREFIX
|
protected static java.lang.String |
NOCONVERT
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
NOCONVERT
protected static final java.lang.String NOCONVERT
- See Also:
- Constant Field Values
CMD_PREFIX
protected static final java.lang.String CMD_PREFIX
- See Also:
- Constant Field Values
ReflectObject
public ReflectObject()
dump
public static void dump(Interp interp)
dispose
public void dispose()
- Specified by:
dispose
in interface InternalRep
duplicate
public InternalRep duplicate()
- Specified by:
duplicate
in interface InternalRep
newInstance
public static TclObject newInstance(Interp interp,
java.lang.Class cl,
java.lang.Object obj)
throws TclException
- Throws:
TclException
get
public static java.lang.Object get(Interp interp,
TclObject tobj)
throws TclException
- Throws:
TclException
getClass
public static java.lang.Class getClass(Interp interp,
TclObject tobj)
throws TclException
- Throws:
TclException
cmdProc
public void cmdProc(Interp interp,
TclObject[] argv)
throws TclException
- Specified by:
cmdProc
in interface Command
- Throws:
TclException
disposeCmd
public void disposeCmd()
- Specified by:
disposeCmd
in interface CommandWithDispose
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object