edu.cmu.cs.crystal.tac.eclipse
Interface IEclipseFieldAccess

All Known Implementing Classes:
EclipseAbstractFieldAccess, EclipseBrokenFieldAccess, EclipseFieldDeclaration, EclipseImplicitFieldAccess, EclipseReferenceFieldAccess, EclipseSuperFieldAccess

public interface IEclipseFieldAccess

Interface used internally to represent field accesses, x.f. This helps dealing with the different possible representations of field accesses in the Eclipse AST (see FieldAccess).

Author:
Kevin Bierhoff

Method Summary
 Variable getAccessedObject()
          Returns the variable representing the target of the field access.
 SimpleName getFieldName()
          Returns the name of the accessed field.
 boolean isExplicitSuperAccess()
          Indicates whether this is an explicit super-field access, super.f.
 boolean isImplicitThisAccess()
          Indicates whether this is an implicit access to a receiver field (which could actually be a field of an outer class).
 IVariableBinding resolveFieldBinding()
          Resolves the binding for the accessed field.
 

Method Detail

getFieldName

SimpleName getFieldName()
Returns the name of the accessed field.

Returns:
Name of the accessed field.

resolveFieldBinding

IVariableBinding resolveFieldBinding()
Resolves the binding for the accessed field. Bindings can usually be resolved, but the underlying Eclipse AST admits the possiblity that null is returned.

Returns:
The binding for the accessed field or null if the binding could not be resolved.

getAccessedObject

Variable getAccessedObject()
Returns the variable representing the target of the field access. The accessed object can be a type or instance variable.

Returns:
the variable representing the target of the field access.

isImplicitThisAccess

boolean isImplicitThisAccess()
Indicates whether this is an implicit access to a receiver field (which could actually be a field of an outer class). Accessing a static field does not constitute an implicit access to the receiver in the sense of this method.

Returns:
true if this is an implicit access to a receiver field and false otherwise.

isExplicitSuperAccess

boolean isExplicitSuperAccess()
Indicates whether this is an explicit super-field access, super.f. The field being accessed may be a static or instance field.

Returns:
true if this is an explicit super-field access, false otherwise.