|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectclassUtils.javassist.compiler.ast.Visitor
classUtils.javassist.compiler.CodeGen
classUtils.javassist.compiler.MemberCodeGen
classUtils.javassist.compiler.JvstCodeGen
public class JvstCodeGen
| Field Summary |
|---|
| Fields inherited from class classUtils.javassist.compiler.CodeGen |
|---|
inStaticMethod |
| Fields inherited from interface classUtils.javassist.compiler.TokenId |
|---|
ABSTRACT, AND_E, ANDAND, ARRAY, ARSHIFT, ARSHIFT_E, assignOps, BadToken, BLOCK, BOOLEAN, BREAK, BYTE, CALL, CASE, CATCH, CHAR, CharConstant, CLASS, CONST, CONTINUE, DECL, DEFAULT, DIV_E, DO, DOUBLE, DoubleConstant, ELSE, EQ, EXOR_E, EXPR, EXTENDS, FALSE, FINAL, FINALLY, FLOAT, FloatConstant, FOR, GE, GOTO, Identifier, IF, IMPLEMENTS, IMPORT, INSTANCEOF, INT, IntConstant, INTERFACE, LABEL, LE, LONG, LongConstant, LSHIFT, LSHIFT_E, MEMBER, MINUS_E, MINUSMINUS, MOD_E, MUL_E, NATIVE, NEQ, NEW, NULL, opNames, OR_E, OROR, PACKAGE, PLUS_E, PLUSPLUS, PRIVATE, PROTECTED, PUBLIC, RETURN, RSHIFT, RSHIFT_E, SHORT, STATIC, STRICT, StringL, SUPER, SWITCH, SYNCHRONIZED, THIS, THROW, THROWS, TRANSIENT, TRUE, TRY, VOID, VOLATILE, WHILE |
| Constructor Summary | |
|---|---|
JvstCodeGen(Bytecode b,
CompileTimeClass cc,
ClassPool cp)
|
|
| Method Summary | |
|---|---|
void |
addNullIfVoid()
|
void |
atCastExpr(CastExpr expr)
|
void |
atMember(Member mem)
|
void |
atMethodArgs(ASTList args,
int[] types,
int[] dims,
java.lang.String[] cnames)
|
int |
atMethodArgsLength(ASTList args)
|
static int |
compileParameterList(Bytecode code,
CompileTimeClass[] params,
int regno)
|
void |
doNumCast(CompileTimeClass type)
|
boolean |
isParamListName(ASTList args)
|
void |
recordParams(CompileTimeClass[] params,
boolean isStatic,
java.lang.String prefix,
java.lang.String paramVarName,
java.lang.String paramsName,
boolean use0,
int paramBase,
java.lang.String target,
SymbolTable tbl)
Makes method parameters $0, $1, ..., $args, and $$ available. |
void |
recordParams(CompileTimeClass[] params,
boolean isStatic,
java.lang.String prefix,
java.lang.String paramVarName,
java.lang.String paramsName,
SymbolTable tbl)
Makes method parameters $0, $1, ..., $args, and $$ available. |
int |
recordReturnType(CompileTimeClass type,
java.lang.String castName,
java.lang.String resultName,
SymbolTable tbl)
Makes a cast to the return type ($r) available. |
void |
recordType(CompileTimeClass t)
Makes $type available. |
int |
recordVariable(CompileTimeClass type,
java.lang.String varName,
SymbolTable tbl)
Makes the given variable name available. |
void |
setProceedHandler(ProceedHandler h,
java.lang.String name)
|
void |
setType(CompileTimeClass type)
|
| Methods inherited from class classUtils.javassist.compiler.MemberCodeGen |
|---|
atMethodCall2, atNewArrayExpr, atNewExpr, getModifiers, getThisClass, lookupField, lookupField, makeParamList, makeThrowsList, setThisMethod |
| Methods inherited from class classUtils.javassist.compiler.CodeGen |
|---|
atArrayLength, atArrayPlusPlus, atArrayRead, atAssignExpr, atASTList, atBinExpr, atClassObject, atCondExpr, atDeclarator, atDoubleConst, atExpr, atFieldDecl, atInstanceOfExpr, atIntConst, atKeyword, atMethodBody, atMethodDecl, atPair, atStmnt, atStringL, atSymbol, atVariable, getMaxLocals, is2word, setMaxLocals |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JvstCodeGen(Bytecode b,
CompileTimeClass cc,
ClassPool cp)
| Method Detail |
|---|
public void setProceedHandler(ProceedHandler h,
java.lang.String name)
public void addNullIfVoid()
public void atMember(Member mem)
throws CompileError
atMember in class MemberCodeGenCompileError
public void atCastExpr(CastExpr expr)
throws CompileError
atCastExpr in class CodeGenCompileErrorpublic boolean isParamListName(ASTList args)
public int atMethodArgsLength(ASTList args)
atMethodArgsLength in class MemberCodeGen
public void atMethodArgs(ASTList args,
int[] types,
int[] dims,
java.lang.String[] cnames)
throws CompileError
atMethodArgs in class MemberCodeGenCompileError
public int recordReturnType(CompileTimeClass type,
java.lang.String castName,
java.lang.String resultName,
SymbolTable tbl)
throws CompileError
If the return type is void, ($r) does nothing. The type of $_ is java.lang.Object.
resultName - null if $_ is not used.
CompileErrorpublic void recordType(CompileTimeClass t)
public void recordParams(CompileTimeClass[] params,
boolean isStatic,
java.lang.String prefix,
java.lang.String paramVarName,
java.lang.String paramsName,
SymbolTable tbl)
throws CompileError
CompileError
public void recordParams(CompileTimeClass[] params,
boolean isStatic,
java.lang.String prefix,
java.lang.String paramVarName,
java.lang.String paramsName,
boolean use0,
int paramBase,
java.lang.String target,
SymbolTable tbl)
throws CompileError
paramBase - the register number of $0 (use0 is true)
or $1 (otherwise).target - the class of $0. If use0 is false, target
can be null.isStatic - true if the method in which the compiled bytecode
is embedded is static.
CompileError
public int recordVariable(CompileTimeClass type,
java.lang.String varName,
SymbolTable tbl)
throws CompileError
type - variable typevarName - variable name
CompileError
public static int compileParameterList(Bytecode code,
CompileTimeClass[] params,
int regno)
public void setType(CompileTimeClass type)
throws CompileError
CompileError
public void doNumCast(CompileTimeClass type)
throws CompileError
CompileError
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||