Java Doc for CallFrame.java in  » Scripting » jacl » tcl » lang » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Scripting » jacl » tcl.lang 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   tcl.lang.CallFrame

CallFrame
public class CallFrame (Code)
This class implements a frame in the call stack. This class can be overridden to define new variable scoping rules for the Tcl interpreter.


Field Summary
 CallFramecaller
     Value of interp.frame when this procedure was invoked (i.e.
 CallFramecallerVar
     Value of interp.varFrame when this procedure was invoked (i.e.
 Var[]compiledLocals
     Array of local variables in a compiled proc frame. These include locals set in the proc, globals or other variable brought into the proc scope, and compiler generated aliases to globals. This array is always null for an interpreted proc. A compiled proc implementation known which variable is associated with each slot at compile time, so it is able to avoid a hashtable lookup each time the variable is accessed.
 String[]compiledLocalsNames
    
 Interpinterp
     The interpreter associated with this call frame.
 booleanisProcCallFrame
     If true, the frame was pushed to execute a Tcl procedure and may have local vars.
 intlevel
     Level of recursion.
 Namespacens
     The Namespace this CallFrame is executing in.
 TclObject[]objv
     Stores the arguments of the procedure associated with this CallFrame.
 HashMapvarTable
     Stores the variables of this CallFrame.

Constructor Summary
 CallFrame(Interp i)
     Creates a CallFrame for the global variables.
 CallFrame(Interp i, Procedure proc, TclObject[] objv)
     Creates a CallFrame.

Method Summary
 voidchain(Procedure proc, TclObject[] objv)
     Chain this frame into the call frame stack and binds the parameters values to the formal parameters of the procedure.
protected  voiddispose()
     This method is called when this CallFrame is no longer needed. Removes the reference of this object from the interpreter so that this object can be garbage collected.

For this procedure to work correctly, it must not be possible for any of the variable in the table to be accessed from Tcl commands (e.g.

static  booleanexists(Interp interp, String name)
    
Parameters:
  name - the name of the variable.
static  intgetFrame(Interp interp, String string, CallFrame[] frameArr)
     Tcl_GetFrame -> getFrame Given a description of a procedure frame, such as the first argument to an "uplevel" or "upvar" command, locate the call frame for the appropriate level of procedure. The return value is 1 if string was either a number or a number preceded by "#" and it specified a valid frame.
 ArrayListgetLocalVarNames()
    
 ArrayListgetVarNames()
    

Field Detail
caller
CallFrame caller(Code)
Value of interp.frame when this procedure was invoked (i.e. next in stack of all active procedures).



callerVar
CallFrame callerVar(Code)
Value of interp.varFrame when this procedure was invoked (i.e. determines variable scoping within caller; same as caller unless an "uplevel" command or something equivalent was active in the caller).



compiledLocals
Var[] compiledLocals(Code)
Array of local variables in a compiled proc frame. These include locals set in the proc, globals or other variable brought into the proc scope, and compiler generated aliases to globals. This array is always null for an interpreted proc. A compiled proc implementation known which variable is associated with each slot at compile time, so it is able to avoid a hashtable lookup each time the variable is accessed. Both scalar variables and array variables could appear in this array.



compiledLocalsNames
String[] compiledLocalsNames(Code)



interp
Interp interp(Code)
The interpreter associated with this call frame.



isProcCallFrame
boolean isProcCallFrame(Code)
If true, the frame was pushed to execute a Tcl procedure and may have local vars. If false, the frame was pushed to execute a namespace command and var references are treated as references to namespace vars; varTable is ignored.



level
int level(Code)
Level of recursion. = 0 for the global level.



ns
Namespace ns(Code)
The Namespace this CallFrame is executing in. Used to resolve commands and global variables.



objv
TclObject[] objv(Code)
Stores the arguments of the procedure associated with this CallFrame. Is null for global level.



varTable
HashMap varTable(Code)
Stores the variables of this CallFrame.




Constructor Detail
CallFrame
CallFrame(Interp i)(Code)
Creates a CallFrame for the global variables.
Parameters:
  interp - current interpreter.



CallFrame
CallFrame(Interp i, Procedure proc, TclObject[] objv) throws TclException(Code)
Creates a CallFrame. It changes the following variables:
  • this.caller
  • this.callerVar
  • interp.frame
  • interp.varFrame

Parameters:
  i - current interpreter.
Parameters:
  proc - the procedure to invoke in this call frame.
Parameters:
  objv - the arguments to the procedure.
exception:
  TclException - if error occurs in parameter bindings.




Method Detail
chain
void chain(Procedure proc, TclObject[] objv) throws TclException(Code)
Chain this frame into the call frame stack and binds the parameters values to the formal parameters of the procedure.
Parameters:
  proc - the procedure.
Parameters:
  proc - argv the parameter values.
exception:
  TclException - if wrong number of arguments.



dispose
protected void dispose()(Code)
This method is called when this CallFrame is no longer needed. Removes the reference of this object from the interpreter so that this object can be garbage collected.

For this procedure to work correctly, it must not be possible for any of the variable in the table to be accessed from Tcl commands (e.g. from trace procedures).




exists
static boolean exists(Interp interp, String name)(Code)

Parameters:
  name - the name of the variable. true if a variable exists and is defined inside thisCallFrame, false otherwise



getFrame
static int getFrame(Interp interp, String string, CallFrame[] frameArr) throws TclException(Code)
Tcl_GetFrame -> getFrame Given a description of a procedure frame, such as the first argument to an "uplevel" or "upvar" command, locate the call frame for the appropriate level of procedure. The return value is 1 if string was either a number or a number preceded by "#" and it specified a valid frame. 0 is returned if string isn't one of the two things above (in this case, the lookup acts as if string were "1"). The frameArr[0] reference will be filled by the reference of the desired frame (unless an error occurs, in which case it isn't modified).
Parameters:
  string - a string that specifies the level.
exception:
  TclException - if s is a valid level specifier butrefers to a bad level that doesn't exist.



getLocalVarNames
ArrayList getLocalVarNames()(Code)
a List of the names of the (defined) local variablesin this CallFrame (excluding upvar's)



getVarNames
ArrayList getVarNames()(Code)
a List of the names of the (defined) variablesin this CallFrame.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.