Java Doc for TreeMaker.java in  » 6.0-JDK-Modules-sun » javac-compiler » com » sun » tools » javac » tree » 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 » 6.0 JDK Modules sun » javac compiler » com.sun.tools.javac.tree 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.tools.javac.tree.TreeMaker

TreeMaker
public class TreeMaker implements JCTree.Factory(Code)
Factory class for trees.

This is NOT part of any API supported by Sun Microsystems. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.


Inner Class :class AnnotationBuilder implements Attribute.Visitor

Field Summary
 AnnotationBuilderannotationBuilder
    
 Name.Tablenames
     The current name table.
public  intpos
     The position at which subsequent trees will be created.
 Symtabsyms
     The current symbol table.
public  JCCompilationUnittoplevel
     The toplevel tree to which created trees belong.
final protected static  Context.Key<TreeMaker>treeMakerKey
     The context key for the tree factory.
 Typestypes
    

Constructor Summary
protected  TreeMaker(Context context)
     Create a tree maker with null toplevel and NOPOS as initial position.
 TreeMaker(JCCompilationUnit toplevel, Name.Table names, Types types, Symtab syms)
     Create a tree maker with a given toplevel and FIRSTPOS as initial position.

Method Summary
public  JCAnnotationAnnotation(JCTree annotationType, List<JCExpression> args)
    
public  JCAnnotationAnnotation(Attribute a)
     Create an annotation tree from an attribute.
public  List<JCAnnotation>Annotations(List<Attribute.Compound> attributes)
     Create annotation trees from annotations.
public  JCClassDeclAnonymousClassDef(JCModifiers mods, List<JCTree> defs)
    
public  JCMethodInvocationApp(JCExpression meth, List<JCExpression> args)
     Create a method invocation from a method tree and a list of argument trees.
public  JCMethodInvocationApp(JCExpression meth)
    
public  JCMethodInvocationApply(List<JCExpression> typeargs, JCExpression fn, List<JCExpression> args)
    
public  JCAssertAssert(JCExpression cond, JCExpression detail)
    
public  JCAssignAssign(JCExpression lhs, JCExpression rhs)
    
public  JCStatementAssignment(Symbol v, JCExpression rhs)
     Construct an assignment from a variable symbol and a right hand side.
public  JCAssignOpAssignop(int opcode, JCTree lhs, JCTree rhs)
    
public  JCBinaryBinary(int opcode, JCExpression lhs, JCExpression rhs)
    
public  JCBlockBlock(long flags, List<JCStatement> stats)
    
public  JCBreakBreak(Name label)
    
public  JCStatementCall(JCExpression apply)
     Wrap a method invocation in an expression statement or return statement, depending on whether the method invocation expression's type is void.
public  JCCaseCase(JCExpression pat, List<JCStatement> stats)
    
public  JCCatchCatch(JCVariableDecl param, JCBlock body)
    
public  JCClassDeclClassDef(JCModifiers mods, Name name, List<JCTypeParameter> typarams, JCTree extending, List<JCExpression> implementing, List<JCTree> defs)
    
public  JCExpressionClassLiteral(ClassSymbol clazz)
     Create a tree representing a class literal.
public  JCExpressionClassLiteral(Type t)
     Create a tree representing a class literal.
public  JCConditionalConditional(JCExpression cond, JCExpression thenpart, JCExpression elsepart)
    
public  JCContinueContinue(Name label)
    
public  JCExpressionCreate(Symbol ctor, List<JCExpression> args)
     Create a method invocation from a method tree and a list of argument trees.
public  JCDoWhileLoopDoLoop(JCStatement body, JCExpression cond)
    
public  JCErroneousErroneous()
    
public  JCErroneousErroneous(List<? extends JCTree> errs)
    
public  JCExpressionStatementExec(JCExpression expr)
    
public  JCForLoopForLoop(List<JCStatement> init, JCExpression cond, List<JCExpressionStatement> step, JCStatement body)
    
public  JCEnhancedForLoopForeachLoop(JCVariableDecl var, JCExpression expr, JCStatement body)
    
public  JCIdentIdent(Name name)
    
public  JCIdentIdent(Symbol sym)
     Create an identifier from a symbol.
public  JCExpressionIdent(JCVariableDecl param)
     Create an identifier that refers to the variable declared in given variable declaration.
public  List<JCExpression>Idents(List<JCVariableDecl> params)
     Create a list of identifiers referring to the variables declared in given list of variable declarations.
public  JCIfIf(JCExpression cond, JCStatement thenpart, JCStatement elsepart)
    
public  JCImportImport(JCTree qualid, boolean importStatic)
    
public  JCArrayAccessIndexed(JCExpression indexed, JCExpression index)
    
public  JCArrayAccessIndexed(Symbol v, JCExpression index)
     Construct an index expression from a variable and an expression.
public  JCLabeledStatementLabelled(Name label, JCStatement body)
    
public  LetExprLetExpr(List<JCVariableDecl> defs, JCTree expr)
    
public  LetExprLetExpr(JCVariableDecl def, JCTree expr)
    
public  JCLiteralLiteral(int tag, Object value)
    
public  JCLiteralLiteral(Object value)
    
public  JCMethodDeclMethodDef(JCModifiers mods, Name name, JCExpression restype, List<JCTypeParameter> typarams, List<JCVariableDecl> params, List<JCExpression> thrown, JCBlock body, JCExpression defaultValue)
    
public  JCMethodDeclMethodDef(MethodSymbol m, JCBlock body)
     Create a method definition from a method symbol and a method body.
public  JCMethodDeclMethodDef(MethodSymbol m, Type mtype, JCBlock body)
     Create a method definition from a method symbol, method type and a method body.
public  JCModifiersModifiers(long flags, List<JCAnnotation> annotations)
    
public  JCModifiersModifiers(long flags)
    
public  JCNewArrayNewArray(JCExpression elemtype, List<JCExpression> dims, List<JCExpression> elems)
    
public  JCNewClassNewClass(JCExpression encl, List<JCExpression> typeargs, JCExpression clazz, List<JCExpression> args, JCClassDecl def)
    
public  JCVariableDeclParam(Name name, Type argtype, Symbol owner)
     Create a value parameter tree from its name, type, and owner.
public  List<JCVariableDecl>Params(List<Type> argtypes, Symbol owner)
     Create a a list of value parameter trees x0, ..., xn from a list of their types and an their owner.
public  JCParensParens(JCExpression expr)
    
public  JCExpressionQualIdent(Symbol sym)
     Create a qualified identifier from a symbol, adding enough qualifications to make the reference unique.
public  JCReturnReturn(JCExpression expr)
    
public  JCFieldAccessSelect(JCExpression selected, Name selector)
    
public  JCExpressionSelect(JCExpression base, Symbol sym)
     Create a selection node from a qualifier tree and a symbol.
public  JCSkipSkip()
    
public  JCIdentSuper(Type t, TypeSymbol owner)
     Create a tree representing `super', given its type and owner.
public  JCSwitchSwitch(JCExpression selector, List<JCCase> cases)
    
public  JCSynchronizedSynchronized(JCExpression lock, JCBlock body)
    
public  JCExpressionThis(Type t)
     Create a tree representing `this', given its type.
public  JCThrowThrow(JCTree expr)
    
public  JCCompilationUnitTopLevel(List<JCAnnotation> packageAnnotations, JCExpression pid, List<JCTree> defs)
     Create given tree node at current position.
public  JCTryTry(JCBlock body, List<JCCatch> catchers, JCBlock finalizer)
    
public  JCExpressionType(Type t)
     Create a tree representing given type.
public  JCTypeApplyTypeApply(JCExpression clazz, List<JCExpression> arguments)
    
public  JCArrayTypeTreeTypeArray(JCExpression elemtype)
    
public  TypeBoundKindTypeBoundKind(BoundKind kind)
    
public  JCTypeCastTypeCast(JCTree clazz, JCExpression expr)
    
public  JCTypeCastTypeCast(Type type, JCExpression expr)
     Make an attributed type cast expression.
public  JCPrimitiveTypeTreeTypeIdent(int typetag)
    
public  JCTypeParameterTypeParam(Name name, TypeVar tvar)
     Create a type parameter tree from its name and type.
public  JCTypeParameterTypeParameter(Name name, List<JCExpression> bounds)
    
public  List<JCTypeParameter>TypeParams(List<Type> typarams)
     Create a list of type parameter trees from a list of type variables.
public  JCInstanceOfTypeTest(JCExpression expr, JCTree clazz)
    
public  List<JCExpression>Types(List<Type> ts)
     Create a list of trees representing given list of types.
public  JCUnaryUnary(int opcode, JCExpression arg)
    
public  JCVariableDeclVarDef(JCModifiers mods, Name name, JCExpression vartype, JCExpression init)
    
public  JCVariableDeclVarDef(VarSymbol v, JCExpression init)
     Create a variable definition from a variable symbol and an initializer expression.
public  JCWhileLoopWhileLoop(JCExpression cond, JCStatement body)
    
public  JCWildcardWildcard(TypeBoundKind kind, JCTree type)
    
public  TreeMakerat(int pos)
     Reassign current position.
public  TreeMakerat(DiagnosticPosition pos)
     Reassign current position.
public  TreeMakerforToplevel(JCCompilationUnit toplevel)
     Create a new tree maker for a given toplevel.
public static  TreeMakerinstance(Context context)
     Get the TreeMaker instance.
 booleanisUnqualifiable(Symbol sym)
    
public  NameparamName(int i)
     The name of synthetic parameter number `i'.
public  NametyparamName(int i)
     The name of synthetic type parameter number `i'.

Field Detail
annotationBuilder
AnnotationBuilder annotationBuilder(Code)



names
Name.Table names(Code)
The current name table.



pos
public int pos(Code)
The position at which subsequent trees will be created.



syms
Symtab syms(Code)
The current symbol table.



toplevel
public JCCompilationUnit toplevel(Code)
The toplevel tree to which created trees belong.



treeMakerKey
final protected static Context.Key<TreeMaker> treeMakerKey(Code)
The context key for the tree factory.



types
Types types(Code)




Constructor Detail
TreeMaker
protected TreeMaker(Context context)(Code)
Create a tree maker with null toplevel and NOPOS as initial position.



TreeMaker
TreeMaker(JCCompilationUnit toplevel, Name.Table names, Types types, Symtab syms)(Code)
Create a tree maker with a given toplevel and FIRSTPOS as initial position.




Method Detail
Annotation
public JCAnnotation Annotation(JCTree annotationType, List<JCExpression> args)(Code)



Annotation
public JCAnnotation Annotation(Attribute a)(Code)
Create an annotation tree from an attribute.



Annotations
public List<JCAnnotation> Annotations(List<Attribute.Compound> attributes)(Code)
Create annotation trees from annotations.



AnonymousClassDef
public JCClassDecl AnonymousClassDef(JCModifiers mods, List<JCTree> defs)(Code)



App
public JCMethodInvocation App(JCExpression meth, List<JCExpression> args)(Code)
Create a method invocation from a method tree and a list of argument trees.



App
public JCMethodInvocation App(JCExpression meth)(Code)
Create a no-arg method invocation from a method tree



Apply
public JCMethodInvocation Apply(List<JCExpression> typeargs, JCExpression fn, List<JCExpression> args)(Code)



Assert
public JCAssert Assert(JCExpression cond, JCExpression detail)(Code)



Assign
public JCAssign Assign(JCExpression lhs, JCExpression rhs)(Code)



Assignment
public JCStatement Assignment(Symbol v, JCExpression rhs)(Code)
Construct an assignment from a variable symbol and a right hand side.



Assignop
public JCAssignOp Assignop(int opcode, JCTree lhs, JCTree rhs)(Code)



Binary
public JCBinary Binary(int opcode, JCExpression lhs, JCExpression rhs)(Code)



Block
public JCBlock Block(long flags, List<JCStatement> stats)(Code)



Break
public JCBreak Break(Name label)(Code)



Call
public JCStatement Call(JCExpression apply)(Code)
Wrap a method invocation in an expression statement or return statement, depending on whether the method invocation expression's type is void.



Case
public JCCase Case(JCExpression pat, List<JCStatement> stats)(Code)



Catch
public JCCatch Catch(JCVariableDecl param, JCBlock body)(Code)



ClassDef
public JCClassDecl ClassDef(JCModifiers mods, Name name, List<JCTypeParameter> typarams, JCTree extending, List<JCExpression> implementing, List<JCTree> defs)(Code)



ClassLiteral
public JCExpression ClassLiteral(ClassSymbol clazz)(Code)
Create a tree representing a class literal.



ClassLiteral
public JCExpression ClassLiteral(Type t)(Code)
Create a tree representing a class literal.



Conditional
public JCConditional Conditional(JCExpression cond, JCExpression thenpart, JCExpression elsepart)(Code)



Continue
public JCContinue Continue(Name label)(Code)



Create
public JCExpression Create(Symbol ctor, List<JCExpression> args)(Code)
Create a method invocation from a method tree and a list of argument trees.



DoLoop
public JCDoWhileLoop DoLoop(JCStatement body, JCExpression cond)(Code)



Erroneous
public JCErroneous Erroneous()(Code)



Erroneous
public JCErroneous Erroneous(List<? extends JCTree> errs)(Code)



Exec
public JCExpressionStatement Exec(JCExpression expr)(Code)



ForLoop
public JCForLoop ForLoop(List<JCStatement> init, JCExpression cond, List<JCExpressionStatement> step, JCStatement body)(Code)



ForeachLoop
public JCEnhancedForLoop ForeachLoop(JCVariableDecl var, JCExpression expr, JCStatement body)(Code)



Ident
public JCIdent Ident(Name name)(Code)



Ident
public JCIdent Ident(Symbol sym)(Code)
Create an identifier from a symbol.



Ident
public JCExpression Ident(JCVariableDecl param)(Code)
Create an identifier that refers to the variable declared in given variable declaration.



Idents
public List<JCExpression> Idents(List<JCVariableDecl> params)(Code)
Create a list of identifiers referring to the variables declared in given list of variable declarations.



If
public JCIf If(JCExpression cond, JCStatement thenpart, JCStatement elsepart)(Code)



Import
public JCImport Import(JCTree qualid, boolean importStatic)(Code)



Indexed
public JCArrayAccess Indexed(JCExpression indexed, JCExpression index)(Code)



Indexed
public JCArrayAccess Indexed(Symbol v, JCExpression index)(Code)
Construct an index expression from a variable and an expression.



Labelled
public JCLabeledStatement Labelled(Name label, JCStatement body)(Code)



LetExpr
public LetExpr LetExpr(List<JCVariableDecl> defs, JCTree expr)(Code)



LetExpr
public LetExpr LetExpr(JCVariableDecl def, JCTree expr)(Code)



Literal
public JCLiteral Literal(int tag, Object value)(Code)



Literal
public JCLiteral Literal(Object value)(Code)



MethodDef
public JCMethodDecl MethodDef(JCModifiers mods, Name name, JCExpression restype, List<JCTypeParameter> typarams, List<JCVariableDecl> params, List<JCExpression> thrown, JCBlock body, JCExpression defaultValue)(Code)



MethodDef
public JCMethodDecl MethodDef(MethodSymbol m, JCBlock body)(Code)
Create a method definition from a method symbol and a method body.



MethodDef
public JCMethodDecl MethodDef(MethodSymbol m, Type mtype, JCBlock body)(Code)
Create a method definition from a method symbol, method type and a method body.



Modifiers
public JCModifiers Modifiers(long flags, List<JCAnnotation> annotations)(Code)



Modifiers
public JCModifiers Modifiers(long flags)(Code)



NewArray
public JCNewArray NewArray(JCExpression elemtype, List<JCExpression> dims, List<JCExpression> elems)(Code)



NewClass
public JCNewClass NewClass(JCExpression encl, List<JCExpression> typeargs, JCExpression clazz, List<JCExpression> args, JCClassDecl def)(Code)



Param
public JCVariableDecl Param(Name name, Type argtype, Symbol owner)(Code)
Create a value parameter tree from its name, type, and owner.



Params
public List<JCVariableDecl> Params(List<Type> argtypes, Symbol owner)(Code)
Create a a list of value parameter trees x0, ..., xn from a list of their types and an their owner.



Parens
public JCParens Parens(JCExpression expr)(Code)



QualIdent
public JCExpression QualIdent(Symbol sym)(Code)
Create a qualified identifier from a symbol, adding enough qualifications to make the reference unique.



Return
public JCReturn Return(JCExpression expr)(Code)



Select
public JCFieldAccess Select(JCExpression selected, Name selector)(Code)



Select
public JCExpression Select(JCExpression base, Symbol sym)(Code)
Create a selection node from a qualifier tree and a symbol.
Parameters:
  base - The qualifier tree.



Skip
public JCSkip Skip()(Code)



Super
public JCIdent Super(Type t, TypeSymbol owner)(Code)
Create a tree representing `super', given its type and owner.



Switch
public JCSwitch Switch(JCExpression selector, List<JCCase> cases)(Code)



Synchronized
public JCSynchronized Synchronized(JCExpression lock, JCBlock body)(Code)



This
public JCExpression This(Type t)(Code)
Create a tree representing `this', given its type.



Throw
public JCThrow Throw(JCTree expr)(Code)



TopLevel
public JCCompilationUnit TopLevel(List<JCAnnotation> packageAnnotations, JCExpression pid, List<JCTree> defs)(Code)
Create given tree node at current position.
Parameters:
  defs - a list of ClassDef, Import, and Skip



Try
public JCTry Try(JCBlock body, List<JCCatch> catchers, JCBlock finalizer)(Code)



Type
public JCExpression Type(Type t)(Code)
Create a tree representing given type.



TypeApply
public JCTypeApply TypeApply(JCExpression clazz, List<JCExpression> arguments)(Code)



TypeArray
public JCArrayTypeTree TypeArray(JCExpression elemtype)(Code)



TypeBoundKind
public TypeBoundKind TypeBoundKind(BoundKind kind)(Code)



TypeCast
public JCTypeCast TypeCast(JCTree clazz, JCExpression expr)(Code)



TypeCast
public JCTypeCast TypeCast(Type type, JCExpression expr)(Code)
Make an attributed type cast expression.



TypeIdent
public JCPrimitiveTypeTree TypeIdent(int typetag)(Code)



TypeParam
public JCTypeParameter TypeParam(Name name, TypeVar tvar)(Code)
Create a type parameter tree from its name and type.



TypeParameter
public JCTypeParameter TypeParameter(Name name, List<JCExpression> bounds)(Code)



TypeParams
public List<JCTypeParameter> TypeParams(List<Type> typarams)(Code)
Create a list of type parameter trees from a list of type variables.



TypeTest
public JCInstanceOf TypeTest(JCExpression expr, JCTree clazz)(Code)



Types
public List<JCExpression> Types(List<Type> ts)(Code)
Create a list of trees representing given list of types.



Unary
public JCUnary Unary(int opcode, JCExpression arg)(Code)



VarDef
public JCVariableDecl VarDef(JCModifiers mods, Name name, JCExpression vartype, JCExpression init)(Code)



VarDef
public JCVariableDecl VarDef(VarSymbol v, JCExpression init)(Code)
Create a variable definition from a variable symbol and an initializer expression.



WhileLoop
public JCWhileLoop WhileLoop(JCExpression cond, JCStatement body)(Code)



Wildcard
public JCWildcard Wildcard(TypeBoundKind kind, JCTree type)(Code)



at
public TreeMaker at(int pos)(Code)
Reassign current position.



at
public TreeMaker at(DiagnosticPosition pos)(Code)
Reassign current position.



forToplevel
public TreeMaker forToplevel(JCCompilationUnit toplevel)(Code)
Create a new tree maker for a given toplevel.



instance
public static TreeMaker instance(Context context)(Code)
Get the TreeMaker instance.



isUnqualifiable
boolean isUnqualifiable(Symbol sym)(Code)
Can given symbol be referred to in unqualified form?



paramName
public Name paramName(int i)(Code)
The name of synthetic parameter number `i'.



typaramName
public Name typaramName(int i)(Code)
The name of synthetic type parameter number `i'.



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.