|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectclassUtils.javassist.expr.Expr
classUtils.javassist.expr.FieldAccess
public class FieldAccess
Expression for accessing a field.
Field Summary |
---|
Method Summary | |
---|---|
java.lang.String |
getClassName()
Returns the name of the class in which the field is declared. |
CtField |
getField()
Returns the field accessed by this expression. |
java.lang.String |
getFieldName()
Returns the name of the field. |
java.lang.String |
getFileName()
Returns the source file containing the field access. |
int |
getLineNumber()
Returns the line number of the source line containing the field access. |
boolean |
isReader()
Returns true if the field is read. |
boolean |
isStatic()
Returns true if the field is static. |
boolean |
isWriter()
Returns true if the field is written in. |
CompileTimeClass[] |
mayThrow()
Returns the list of exceptions that the expression may throw. |
void |
replace(java.lang.String statement)
Replaces the method call with the bytecode derived from the given source text. |
CtBehavior |
where()
Returns the method or constructor containing the field-access expression represented by this object. |
Methods inherited from class classUtils.javassist.expr.Expr |
---|
indexOfBytecode |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public CtBehavior where()
where
in class Expr
public int getLineNumber()
getLineNumber
in class Expr
public java.lang.String getFileName()
getFileName
in class Expr
public boolean isStatic()
public boolean isReader()
public boolean isWriter()
public java.lang.String getClassName()
public java.lang.String getFieldName()
public CtField getField() throws NotFoundException
NotFoundException
public CompileTimeClass[] mayThrow()
mayThrow
in class Expr
public void replace(java.lang.String statement) throws CannotCompileException
$0 is available even if the called method is static. If the field access is writing, $_ is available but the value of $_ is ignored.
statement
- a Java statement.
CannotCompileException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |