Java Doc for CodeGen.java in  » Byte-Code » Javassist » javassist » compiler » 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 » Byte Code » Javassist » javassist.compiler 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javassist.compiler.ast.Visitor
      javassist.compiler.CodeGen

All known Subclasses:   javassist.compiler.MemberCodeGen,
CodeGen
abstract public class CodeGen extends Visitor implements Opcode,TokenId(Code)

Inner Class :abstract protected static class ReturnHook

Field Summary
protected  intarrayDim
    
final static  int[]binOp
    
protected  ArrayListbreakListcontinueList
    
protected  Bytecodebytecode
    
protected  StringclassName
    
protected  intexprType
    
protected  booleanhasReturned
     true if the last visited node is a return statement.
public  booleaninStaticMethod
     Must be true if compilation is for a static method.
final static  StringjavaLangObject
    
final static  StringjavaLangString
    
final static  StringjvmJavaLangObject
    
final static  StringjvmJavaLangString
    
protected  ReturnHookreturnHooks
    
 TypeCheckertypeChecker
    

Constructor Summary
public  CodeGen(Bytecode b)
    

Method Summary
protected  voidarrayAccess(ASTree array, ASTree index)
    
public  voidatASTList(ASTList n)
    
abstract public  voidatArrayInit(ArrayInit init)
    
public  voidatArrayPlusPlus(int token, boolean isPost, Expr expr, boolean doDup)
    
public  voidatArrayRead(ASTree array, ASTree index)
    
abstract protected  voidatArrayVariableAssign(ArrayInit init, int varType, int varArray, String varClass)
    
protected  voidatAssignCore(Expr expr, int op, ASTree right, int type, int dim, String cname)
    
public  voidatAssignExpr(AssignExpr expr)
    
protected  voidatAssignExpr(AssignExpr expr, boolean doDup)
    
public  voidatBinExpr(BinExpr expr)
    
abstract public  voidatCallExpr(CallExpr expr)
    
public  voidatCastExpr(CastExpr expr)
    
public  voidatClassObject(Expr expr)
    
public  voidatCondExpr(CondExpr expr)
    
public  voidatDeclarator(Declarator d)
    
public  voidatDoubleConst(DoubleConst d)
    
public  voidatExpr(Expr expr)
    
abstract protected  voidatFieldAssign(Expr expr, int op, ASTree left, ASTree right, boolean doDup)
    
public  voidatFieldDecl(FieldDecl field)
    
abstract protected  voidatFieldPlusPlus(int token, boolean isPost, ASTree oprand, Expr expr, boolean doDup)
    
abstract protected  voidatFieldRead(ASTree expr)
    
public  voidatInstanceOfExpr(InstanceOfExpr expr)
    
public  voidatIntConst(IntConst i)
    
public  voidatKeyword(Keyword k)
    
abstract public  voidatMember(Member n)
    
public  voidatMethodBody(Stmnt s, boolean isCons, boolean isVoid)
    
public  voidatMethodDecl(MethodDecl method)
    
abstract public  voidatNewExpr(NewExpr n)
    
 voidatNumCastExpr(int srcType, int destType)
    
public  voidatPair(Pair n)
    
protected  voidatPlusPlusCore(int dup_code, boolean doDup, int token, boolean isPost, Expr expr)
    
protected  voidatReturnStmnt(Stmnt st)
    
final protected  voidatReturnStmnt2(ASTree result)
    
public  voidatStmnt(Stmnt st)
    
public  voidatStringL(StringL s)
    
public  voidatSymbol(Symbol n)
    
protected  voidatTryStmnt(Stmnt st)
    
public  voidatVariable(Variable v)
    
protected static  voidbadAssign(Expr expr)
    
protected static  voidbadType(Expr expr)
    
protected static  voidbadTypes(Expr expr)
    
public  booleancompileBooleanExpr(boolean branchIf, ASTree expr)
    
public  voidcompileExpr(ASTree expr)
    
public  voiddoTypeCheck(ASTree expr)
    
protected static  voidfatal()
    
protected static  intgetArrayReadOp(int type, int dim)
    
protected static  intgetArrayWriteOp(int type, int dim)
    
static  intgetCompOperator(ASTree expr)
    
protected  intgetLocalVar(Declarator d)
    
public  intgetMaxLocals()
    
abstract protected  StringgetSuperName()
     Returns the JVM-internal representation of this super class name.
protected  intgetTempVar()
     Returns a local variable that single or double words can be stored in.
abstract protected  StringgetThisName()
     Returns the JVM-internal representation of this class name.
protected  voidincMaxLocals(int size)
    
abstract protected  voidinsertDefaultSuperCall()
    
public static  booleanis2word(int type, int dim)
    
static  booleanisP_INT(int type)
    
protected static  booleanisRefType(int type)
    
static  intlookupBinOp(int token)
    
protected  voidpatchGoto(ArrayList list, int targetPc)
    
abstract protected  StringresolveClassName(ASTList name)
    
abstract protected  StringresolveClassName(String jvmClassName)
    
static  booleanrightIsStrong(int type1, int type2)
    
public  voidsetMaxLocals(int n)
    
public  voidsetTypeChecker(TypeChecker checker)
    
protected static  StringtoJvmArrayName(String name, int dim)
    
protected static  StringtoJvmTypeName(int type, int dim)
    

Field Detail
arrayDim
protected int arrayDim(Code)



binOp
final static int[] binOp(Code)



breakListcontinueList
protected ArrayList breakListcontinueList(Code)



bytecode
protected Bytecode bytecode(Code)



className
protected String className(Code)



exprType
protected int exprType(Code)



hasReturned
protected boolean hasReturned(Code)
true if the last visited node is a return statement.



inStaticMethod
public boolean inStaticMethod(Code)
Must be true if compilation is for a static method.



javaLangObject
final static String javaLangObject(Code)



javaLangString
final static String javaLangString(Code)



jvmJavaLangObject
final static String jvmJavaLangObject(Code)



jvmJavaLangString
final static String jvmJavaLangString(Code)



returnHooks
protected ReturnHook returnHooks(Code)



typeChecker
TypeChecker typeChecker(Code)




Constructor Detail
CodeGen
public CodeGen(Bytecode b)(Code)




Method Detail
arrayAccess
protected void arrayAccess(ASTree array, ASTree index) throws CompileError(Code)



atASTList
public void atASTList(ASTList n) throws CompileError(Code)



atArrayInit
abstract public void atArrayInit(ArrayInit init) throws CompileError(Code)



atArrayPlusPlus
public void atArrayPlusPlus(int token, boolean isPost, Expr expr, boolean doDup) throws CompileError(Code)



atArrayRead
public void atArrayRead(ASTree array, ASTree index) throws CompileError(Code)



atArrayVariableAssign
abstract protected void atArrayVariableAssign(ArrayInit init, int varType, int varArray, String varClass) throws CompileError(Code)



atAssignCore
protected void atAssignCore(Expr expr, int op, ASTree right, int type, int dim, String cname) throws CompileError(Code)



atAssignExpr
public void atAssignExpr(AssignExpr expr) throws CompileError(Code)



atAssignExpr
protected void atAssignExpr(AssignExpr expr, boolean doDup) throws CompileError(Code)



atBinExpr
public void atBinExpr(BinExpr expr) throws CompileError(Code)



atCallExpr
abstract public void atCallExpr(CallExpr expr) throws CompileError(Code)



atCastExpr
public void atCastExpr(CastExpr expr) throws CompileError(Code)



atClassObject
public void atClassObject(Expr expr) throws CompileError(Code)



atCondExpr
public void atCondExpr(CondExpr expr) throws CompileError(Code)



atDeclarator
public void atDeclarator(Declarator d) throws CompileError(Code)



atDoubleConst
public void atDoubleConst(DoubleConst d) throws CompileError(Code)



atExpr
public void atExpr(Expr expr) throws CompileError(Code)



atFieldAssign
abstract protected void atFieldAssign(Expr expr, int op, ASTree left, ASTree right, boolean doDup) throws CompileError(Code)



atFieldDecl
public void atFieldDecl(FieldDecl field) throws CompileError(Code)



atFieldPlusPlus
abstract protected void atFieldPlusPlus(int token, boolean isPost, ASTree oprand, Expr expr, boolean doDup) throws CompileError(Code)



atFieldRead
abstract protected void atFieldRead(ASTree expr) throws CompileError(Code)



atInstanceOfExpr
public void atInstanceOfExpr(InstanceOfExpr expr) throws CompileError(Code)



atIntConst
public void atIntConst(IntConst i) throws CompileError(Code)



atKeyword
public void atKeyword(Keyword k) throws CompileError(Code)



atMember
abstract public void atMember(Member n) throws CompileError(Code)



atMethodBody
public void atMethodBody(Stmnt s, boolean isCons, boolean isVoid) throws CompileError(Code)

Parameters:
  isCons - true if super() must be called.false if the method is a class initializer.



atMethodDecl
public void atMethodDecl(MethodDecl method) throws CompileError(Code)



atNewExpr
abstract public void atNewExpr(NewExpr n) throws CompileError(Code)



atNumCastExpr
void atNumCastExpr(int srcType, int destType) throws CompileError(Code)



atPair
public void atPair(Pair n) throws CompileError(Code)



atPlusPlusCore
protected void atPlusPlusCore(int dup_code, boolean doDup, int token, boolean isPost, Expr expr) throws CompileError(Code)



atReturnStmnt
protected void atReturnStmnt(Stmnt st) throws CompileError(Code)



atReturnStmnt2
final protected void atReturnStmnt2(ASTree result) throws CompileError(Code)



atStmnt
public void atStmnt(Stmnt st) throws CompileError(Code)



atStringL
public void atStringL(StringL s) throws CompileError(Code)



atSymbol
public void atSymbol(Symbol n) throws CompileError(Code)



atTryStmnt
protected void atTryStmnt(Stmnt st) throws CompileError(Code)



atVariable
public void atVariable(Variable v) throws CompileError(Code)



badAssign
protected static void badAssign(Expr expr) throws CompileError(Code)



badType
protected static void badType(Expr expr) throws CompileError(Code)



badTypes
protected static void badTypes(Expr expr) throws CompileError(Code)



compileBooleanExpr
public boolean compileBooleanExpr(boolean branchIf, ASTree expr) throws CompileError(Code)



compileExpr
public void compileExpr(ASTree expr) throws CompileError(Code)



doTypeCheck
public void doTypeCheck(ASTree expr) throws CompileError(Code)



fatal
protected static void fatal() throws CompileError(Code)



getArrayReadOp
protected static int getArrayReadOp(int type, int dim)(Code)



getArrayWriteOp
protected static int getArrayWriteOp(int type, int dim)(Code)



getCompOperator
static int getCompOperator(ASTree expr) throws CompileError(Code)



getLocalVar
protected int getLocalVar(Declarator d)(Code)



getMaxLocals
public int getMaxLocals()(Code)



getSuperName
abstract protected String getSuperName() throws CompileError(Code)
Returns the JVM-internal representation of this super class name.



getTempVar
protected int getTempVar()(Code)
Returns a local variable that single or double words can be stored in.



getThisName
abstract protected String getThisName()(Code)
Returns the JVM-internal representation of this class name.



incMaxLocals
protected void incMaxLocals(int size)(Code)



insertDefaultSuperCall
abstract protected void insertDefaultSuperCall() throws CompileError(Code)



is2word
public static boolean is2word(int type, int dim)(Code)



isP_INT
static boolean isP_INT(int type)(Code)



isRefType
protected static boolean isRefType(int type)(Code)



lookupBinOp
static int lookupBinOp(int token)(Code)



patchGoto
protected void patchGoto(ArrayList list, int targetPc)(Code)



resolveClassName
abstract protected String resolveClassName(ASTList name) throws CompileError(Code)



resolveClassName
abstract protected String resolveClassName(String jvmClassName) throws CompileError(Code)



rightIsStrong
static boolean rightIsStrong(int type1, int type2)(Code)



setMaxLocals
public void setMaxLocals(int n)(Code)



setTypeChecker
public void setTypeChecker(TypeChecker checker)(Code)



toJvmArrayName
protected static String toJvmArrayName(String name, int dim)(Code)

Parameters:
  name - the JVM-internal representation.name is not exapnded to java.lang.*.



toJvmTypeName
protected static String toJvmTypeName(int type, int dim)(Code)



Methods inherited from javassist.compiler.ast.Visitor
public void atASTList(ASTList n) throws CompileError(Code)(Java Doc)
public void atArrayInit(ArrayInit n) throws CompileError(Code)(Java Doc)
public void atAssignExpr(AssignExpr n) throws CompileError(Code)(Java Doc)
public void atBinExpr(BinExpr n) throws CompileError(Code)(Java Doc)
public void atCallExpr(CallExpr n) throws CompileError(Code)(Java Doc)
public void atCastExpr(CastExpr n) throws CompileError(Code)(Java Doc)
public void atCondExpr(CondExpr n) throws CompileError(Code)(Java Doc)
public void atDeclarator(Declarator n) throws CompileError(Code)(Java Doc)
public void atDoubleConst(DoubleConst n) throws CompileError(Code)(Java Doc)
public void atExpr(Expr n) throws CompileError(Code)(Java Doc)
public void atFieldDecl(FieldDecl n) throws CompileError(Code)(Java Doc)
public void atInstanceOfExpr(InstanceOfExpr n) throws CompileError(Code)(Java Doc)
public void atIntConst(IntConst n) throws CompileError(Code)(Java Doc)
public void atKeyword(Keyword n) throws CompileError(Code)(Java Doc)
public void atMember(Member n) throws CompileError(Code)(Java Doc)
public void atMethodDecl(MethodDecl n) throws CompileError(Code)(Java Doc)
public void atNewExpr(NewExpr n) throws CompileError(Code)(Java Doc)
public void atPair(Pair n) throws CompileError(Code)(Java Doc)
public void atStmnt(Stmnt n) throws CompileError(Code)(Java Doc)
public void atStringL(StringL n) throws CompileError(Code)(Java Doc)
public void atSymbol(Symbol n) throws CompileError(Code)(Java Doc)
public void atVariable(Variable n) throws CompileError(Code)(Java Doc)

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.