Java Doc for IRFactory.java in  » Scripting » rhino » org » mozilla » javascript » 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 » rhino » org.mozilla.javascript 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.mozilla.javascript.IRFactory

IRFactory
final class IRFactory (Code)
This class allows the creation of nodes, and follows the Factory pattern.
See Also:   Node
author:
   Mike McCabe
author:
   Norris Boyd



Constructor Summary
 IRFactory(Parser parser)
    

Method Summary
 voidaddChildToBack(Node parent, Node child)
     Add a child to the back of the given node.
 voidaddSwitchCase(Node switchBlock, Node caseExpression, Node statements)
     If caseExpression argument is null it indicate default label.
 voidcloseSwitch(Node switchBlock)
    
 NodecreateArrayLiteral(ObjArray elems, int skipCount, int destructuringLen)
    
 NodecreateAssignment(int assignType, Node left, Node right)
    
 NodecreateBinary(int nodeType, Node left, Node right)
    
 NodecreateBlock(int lineno)
    
 NodecreateBreak(Node breakStatement, int lineno)
    
 NodecreateCallOrNew(int nodeType, Node child)
    
 NodecreateCatch(String varName, Node catchCond, Node stmts, int lineno)
    
 NodecreateCondExpr(Node cond, Node ifTrue, Node ifFalse)
    
 NodecreateContinue(Node loop, int lineno)
    
 NodecreateDebugger(int lineno)
    
 NodecreateDefaultNamespace(Node expr, int lineno)
    
 NodecreateDestructuringAssignment(int type, Node left, Node right)
     Given a destructuring assignment with a left hand side parsed as an array or object literal and a right hand side expression, rewrite as a series of assignments to the variables defined in left from property accesses to the expression on the right.
 NodecreateDoWhile(Node loop, Node body, Node cond)
    
public  NodecreateDotQuery(Node obj, Node body, int lineno)
    
 NodecreateElementGet(Node target, String namespace, Node elem, int memberTypeFlags)
    
 NodecreateExprStatement(Node expr, int lineno)
    
 NodecreateExprStatementNoReturn(Node expr, int lineno)
    
 NodecreateFor(Node loop, Node init, Node test, Node incr, Node body)
    
 NodecreateForIn(int declType, Node loop, Node lhs, Node obj, Node body, boolean isForEach)
     For ..
 FunctionNodecreateFunction(String name)
    
 NodecreateIf(Node cond, Node ifTrue, Node ifFalse, int lineno)
    
 NodecreateIncDec(int nodeType, boolean post, Node child)
    
 NodecreateLabel(int lineno)
    
 NodecreateLabeledStatement(Node labelArg, Node statement)
    
 NodecreateLeaf(int nodeType)
    
 NodecreateLoopNode(Node loopLabel, int lineno)
     Create loop node.
 NodecreateName(String name)
    
 NodecreateNumber(double number)
    
 NodecreateObjectLiteral(ObjArray elems)
     Object Literals
createObjectLiteral rewrites its argument as object creation plus object property entries, so later compiler stages don't need to know about object literals.
 NodecreatePropertyGet(Node target, String namespace, String name, int memberTypeFlags)
    
 NodecreateRegExp(int regexpIndex)
    
 NodecreateReturn(Node expr, int lineno)
    
 NodecreateScopeNode(int token, int lineno)
     Create a node that can be used to hold lexically scoped variable definitions (via let declarations).
 ScriptOrFnNodecreateScript()
    
 NodecreateString(String string)
    
 NodecreateSwitch(Node expr, int lineno)
     Statement leaf nodes.
 NodecreateThrow(Node expr, int lineno)
    
 NodecreateTryCatchFinally(Node tryBlock, Node catchBlocks, Node finallyBlock, int lineno)
     Try/Catch/Finally The IRFactory tries to express as much as possible in the tree; the responsibilities remaining for Codegen are to add the Java handlers: (Either (but not both) of TARGET and FINALLY might not be defined) - a catch handler for javascript exceptions that unwraps the exception onto the stack and GOTOes to the catch target - a finally handler ...
 NodecreateUnary(int nodeType, Node child)
    
 NodecreateUseLocal(Node localBlock)
    
 NodecreateVariables(int token, int lineno)
    
 NodecreateWhile(Node loop, Node cond, Node body)
    
 NodecreateWith(Node obj, Node body, int lineno)
    
 NodecreateYield(Node child, int lineno)
    
 NodegetLabelLoop(Node label)
    
 NodeinitFunction(FunctionNode fnNode, int functionIndex, Node statements, int functionType)
    
 voidinitScript(ScriptOrFnNode scriptNode, Node body)
    


Constructor Detail
IRFactory
IRFactory(Parser parser)(Code)




Method Detail
addChildToBack
void addChildToBack(Node parent, Node child)(Code)
Add a child to the back of the given node. This function breaks the Factory abstraction, but it removes a requirement from implementors of Node.



addSwitchCase
void addSwitchCase(Node switchBlock, Node caseExpression, Node statements)(Code)
If caseExpression argument is null it indicate default label.



closeSwitch
void closeSwitch(Node switchBlock)(Code)



createArrayLiteral
Node createArrayLiteral(ObjArray elems, int skipCount, int destructuringLen)(Code)



createAssignment
Node createAssignment(int assignType, Node left, Node right)(Code)



createBinary
Node createBinary(int nodeType, Node left, Node right)(Code)
Binary



createBlock
Node createBlock(int lineno)(Code)
Statement block Creates the empty statement block Must make subsequent calls to add statements to the node



createBreak
Node createBreak(Node breakStatement, int lineno)(Code)
Break (possibly labeled)



createCallOrNew
Node createCallOrNew(int nodeType, Node child)(Code)



createCatch
Node createCatch(String varName, Node catchCond, Node stmts, int lineno)(Code)
Catch clause of try/catch/finally
Parameters:
  varName - the name of the variable to bind to the exception
Parameters:
  catchCond - the condition under which to catch the exception.May be null if no condition is given.
Parameters:
  stmts - the statements in the catch clause
Parameters:
  lineno - the starting line number of the catch clause



createCondExpr
Node createCondExpr(Node cond, Node ifTrue, Node ifFalse)(Code)



createContinue
Node createContinue(Node loop, int lineno)(Code)
Continue (possibly labeled)



createDebugger
Node createDebugger(int lineno)(Code)
Debugger



createDefaultNamespace
Node createDefaultNamespace(Node expr, int lineno)(Code)



createDestructuringAssignment
Node createDestructuringAssignment(int type, Node left, Node right)(Code)
Given a destructuring assignment with a left hand side parsed as an array or object literal and a right hand side expression, rewrite as a series of assignments to the variables defined in left from property accesses to the expression on the right.
Parameters:
  type - declaration type: Token.VAR or Token.LET or -1
Parameters:
  left - array or object literal containing NAME nodes forvariables to assign
Parameters:
  right - expression to assign from expression that performs a series of assignments tothe variables defined in left



createDoWhile
Node createDoWhile(Node loop, Node body, Node cond)(Code)
DoWhile



createDotQuery
public Node createDotQuery(Node obj, Node body, int lineno)(Code)
DOTQUERY



createElementGet
Node createElementGet(Node target, String namespace, Node elem, int memberTypeFlags)(Code)



createExprStatement
Node createExprStatement(Node expr, int lineno)(Code)



createExprStatementNoReturn
Node createExprStatementNoReturn(Node expr, int lineno)(Code)



createFor
Node createFor(Node loop, Node init, Node test, Node incr, Node body)(Code)
For



createForIn
Node createForIn(int declType, Node loop, Node lhs, Node obj, Node body, boolean isForEach)(Code)
For .. In



createFunction
FunctionNode createFunction(String name)(Code)



createIf
Node createIf(Node cond, Node ifTrue, Node ifFalse, int lineno)(Code)
If statement



createIncDec
Node createIncDec(int nodeType, boolean post, Node child)(Code)



createLabel
Node createLabel(int lineno)(Code)
Label



createLabeledStatement
Node createLabeledStatement(Node labelArg, Node statement)(Code)
Label



createLeaf
Node createLeaf(int nodeType)(Code)
Leaf



createLoopNode
Node createLoopNode(Node loopLabel, int lineno)(Code)
Create loop node. The parser will later call createWhile|createDoWhile|createFor|createForIn to finish loop generation.



createName
Node createName(String name)(Code)
Name



createNumber
Node createNumber(double number)(Code)
Number (for literals)



createObjectLiteral
Node createObjectLiteral(ObjArray elems)(Code)
Object Literals
createObjectLiteral rewrites its argument as object creation plus object property entries, so later compiler stages don't need to know about object literals.



createPropertyGet
Node createPropertyGet(Node target, String namespace, String name, int memberTypeFlags)(Code)



createRegExp
Node createRegExp(int regexpIndex)(Code)
Regular expressions



createReturn
Node createReturn(Node expr, int lineno)(Code)
Return



createScopeNode
Node createScopeNode(int token, int lineno)(Code)
Create a node that can be used to hold lexically scoped variable definitions (via let declarations).
Parameters:
  token - the token of the node to create
Parameters:
  lineno - line number of source the created node



createScript
ScriptOrFnNode createScript()(Code)



createString
Node createString(String string)(Code)
String (for literals)



createSwitch
Node createSwitch(Node expr, int lineno)(Code)
Statement leaf nodes.



createThrow
Node createThrow(Node expr, int lineno)(Code)
Throw



createTryCatchFinally
Node createTryCatchFinally(Node tryBlock, Node catchBlocks, Node finallyBlock, int lineno)(Code)
Try/Catch/Finally The IRFactory tries to express as much as possible in the tree; the responsibilities remaining for Codegen are to add the Java handlers: (Either (but not both) of TARGET and FINALLY might not be defined) - a catch handler for javascript exceptions that unwraps the exception onto the stack and GOTOes to the catch target - a finally handler ... and a goto to GOTO around these handlers.



createUnary
Node createUnary(int nodeType, Node child)(Code)
Unary



createUseLocal
Node createUseLocal(Node localBlock)(Code)



createVariables
Node createVariables(int token, int lineno)(Code)



createWhile
Node createWhile(Node loop, Node cond, Node body)(Code)
While



createWith
Node createWith(Node obj, Node body, int lineno)(Code)
With



createYield
Node createYield(Node child, int lineno)(Code)



getLabelLoop
Node getLabelLoop(Node label)(Code)



initFunction
Node initFunction(FunctionNode fnNode, int functionIndex, Node statements, int functionType)(Code)



initScript
void initScript(ScriptOrFnNode scriptNode, Node body)(Code)
Script (for associating file/url names with toplevel scripts.)



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.