| java.lang.Object javassist.expr.Expr javassist.expr.FieldAccess
FieldAccess | public class FieldAccess extends Expr (Code) | | Expression for accessing a field.
|
Method Summary | |
public String | getClassName() Returns the name of the class in which the field is declared. | public CtField | getField() Returns the field accessed by this expression. | public String | getFieldName() Returns the name of the field. | public String | getFileName() Returns the source file containing the field access. | public int | getLineNumber() Returns the line number of the source line containing the
field access. | public String | getSignature() Returns the signature of the field type. | public boolean | isReader() Returns true if the field is read. | public boolean | isStatic() Returns true if the field is static. | static boolean | isStatic(int c) | public boolean | isWriter() Returns true if the field is written in. | public CtClass[] | mayThrow() Returns the list of exceptions that the expression may throw. | public void | replace(String statement) Replaces the method call with the bytecode derived from
the given source text. | public CtBehavior | where() Returns the method or constructor containing the field-access
expression represented by this object. |
getClassName | public String getClassName()(Code) | | Returns the name of the class in which the field is declared.
|
getFieldName | public String getFieldName()(Code) | | Returns the name of the field.
|
getFileName | public String getFileName()(Code) | | Returns the source file containing the field access.
null if this information is not available. |
getLineNumber | public int getLineNumber()(Code) | | Returns the line number of the source line containing the
field access.
-1 if this information is not available. |
isReader | public boolean isReader()(Code) | | Returns true if the field is read.
|
isStatic | public boolean isStatic()(Code) | | Returns true if the field is static.
|
isStatic | static boolean isStatic(int c)(Code) | | |
isWriter | public boolean isWriter()(Code) | | Returns true if the field is written in.
|
mayThrow | public CtClass[] mayThrow()(Code) | | Returns the list of exceptions that the expression may throw.
This list includes both the exceptions that the try-catch statements
including the expression can catch and the exceptions that
the throws declaration allows the method to throw.
|
replace | public void replace(String statement) throws CannotCompileException(Code) | | Replaces the method call with the bytecode derived from
the given source text.
$0 is available even if the called method is static.
If the field access is writing, $_ is available but the value
of $_ is ignored.
Parameters: statement - a Java statement. |
where | public CtBehavior where()(Code) | | Returns the method or constructor containing the field-access
expression represented by this object.
|
|
|