|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavassist.expr.Expr
public abstract class Expr
Expression.
Field Summary |
---|
Constructor Summary | |
---|---|
protected |
Expr(int pos,
CodeIterator i,
CtClass declaring,
MethodInfo m)
Undocumented constructor. |
Method Summary | |
---|---|
protected boolean |
edited()
|
protected ConstPool |
getConstPool()
|
CtClass |
getEnclosingClass()
Returns the class that declares the method enclosing this expression. |
java.lang.String |
getFileName()
Returns the source file containing the expression. |
int |
getLineNumber()
Returns the line number of the source line containing the expression. |
int |
indexOfBytecode()
Returns the index of the bytecode corresponding to the expression. |
protected int |
locals()
|
CtClass[] |
mayThrow()
Returns the list of exceptions that the expression may throw. |
abstract void |
replace(java.lang.String statement)
Replaces this expression with the bytecode derived from the given source text. |
void |
replace(java.lang.String statement,
ExprEditor recursive)
Replaces this expression with the bytecode derived from the given source text and ExprEditor . |
protected void |
replace0(int pos,
Bytecode bytecode,
int size)
|
protected void |
runEditor(ExprEditor ed,
CodeIterator oldIterator)
|
protected int |
stack()
|
CtBehavior |
where()
Returns the constructor or method containing the expression. |
protected boolean |
withinStatic()
Returns true if this method is static. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Expr(int pos, CodeIterator i, CtClass declaring, MethodInfo m)
Method Detail |
---|
public CtClass getEnclosingClass()
protected final ConstPool getConstPool()
protected final boolean edited()
protected final int locals()
protected final int stack()
protected final boolean withinStatic()
public CtBehavior where()
public CtClass[] mayThrow()
public int indexOfBytecode()
public int getLineNumber()
public java.lang.String getFileName()
public abstract void replace(java.lang.String statement) throws CannotCompileException
statement
- a Java statement.
CannotCompileException
public void replace(java.lang.String statement, ExprEditor recursive) throws CannotCompileException
ExprEditor
.
statement
- a Java statement.recursive
- if not null, the substituted bytecode
is recursively processed by the given
ExprEditor
.
CannotCompileException
protected void replace0(int pos, Bytecode bytecode, int size) throws BadBytecode
BadBytecode
protected void runEditor(ExprEditor ed, CodeIterator oldIterator) throws CannotCompileException
CannotCompileException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |