javassist.expr
public class FieldAccess extends Expr
Method Summary | |
---|---|
String | getClassName()
Returns the name of the class in which the field is declared. |
CtField | getField()
Returns the field accessed by this expression. |
String | getFieldName()
Returns the name of the field. |
String | getFileName()
Returns the source file containing the field access.
|
int | getLineNumber()
Returns the line number of the source line containing the
field access.
|
String | getSignature()
Returns the signature of the field type.
|
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. |
CtClass[] | mayThrow()
Returns the list of exceptions that the expression may throw.
|
void | replace(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. |
Returns: null if this information is not available.
Returns: -1 if this information is not available.
Since: 3.1
See Also: Descriptor
$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.