Package javassist.compiler.ast
Class Declarator
- java.lang.Object
-
- javassist.compiler.ast.ASTree
-
- javassist.compiler.ast.ASTList
-
- javassist.compiler.ast.Declarator
-
- All Implemented Interfaces:
Serializable,javassist.compiler.TokenId
public class Declarator extends ASTList implements javassist.compiler.TokenId
Variable declarator.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface 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
Constructors Constructor Description Declarator(int type, int dim)Declarator(int type, String jvmClassName, int dim, int var, Symbol sym)Declarator(ASTList className, int dim)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(Visitor v)Is a method for the visitor pattern.voidaddArrayDim(int d)static StringastToClassName(ASTList name, char sep)intgetArrayDim()StringgetClassName()ASTreegetInitializer()intgetLocalVar()StringgetTag()intgetType()SymbolgetVariable()Declaratormake(Symbol sym, int dim, ASTree init)voidsetClassName(String s)voidsetLocalVar(int n)voidsetVariable(Symbol sym)
-
-
-
Method Detail
-
make
public Declarator make(Symbol sym, int dim, ASTree init)
-
getType
public int getType()
-
getArrayDim
public int getArrayDim()
-
addArrayDim
public void addArrayDim(int d)
-
getClassName
public String getClassName()
-
setClassName
public void setClassName(String s)
-
getVariable
public Symbol getVariable()
-
setVariable
public void setVariable(Symbol sym)
-
getInitializer
public ASTree getInitializer()
-
setLocalVar
public void setLocalVar(int n)
-
getLocalVar
public int getLocalVar()
-
getTag
public String getTag()
-
accept
public void accept(Visitor v) throws javassist.compiler.CompileError
Description copied from class:ASTreeIs a method for the visitor pattern. It callsatXXX()on the given visitor, whereXXXis the class name of the node object.
-
-