org.aspectj.compiler.base.ast
Class FieldAccessExpr

java.lang.Object
  extended byorg.aspectj.compiler.base.CompilerObject
      extended byorg.aspectj.compiler.base.ast.ASTObject
          extended byorg.aspectj.compiler.base.ast.Expr
              extended byorg.aspectj.compiler.base.ast.JavaExpr
                  extended byorg.aspectj.compiler.base.ast.AssignableExpr
                      extended byorg.aspectj.compiler.base.ast.FieldAccessExpr
All Implemented Interfaces:
SOLink

public class FieldAccessExpr
extends AssignableExpr
implements SOLink


Field Summary
protected  Expr expr
           
protected  Field field
           
protected  boolean isSuper
           
 
Fields inherited from class org.aspectj.compiler.base.ast.Expr
type
 
Fields inherited from class org.aspectj.compiler.base.ast.ASTObject
dummySource, parent, sourceLocation
 
Constructor Summary
  FieldAccessExpr(Expr expr, Identifier name)
           
  FieldAccessExpr(Expr expr, java.lang.String name)
           
protected FieldAccessExpr(SourceLocation source)
           
  FieldAccessExpr(SourceLocation location, Expr _expr, Field _field, boolean _isSuper)
           
  FieldAccessExpr(SourceLocation source, Expr expr, java.lang.String name)
           
  FieldAccessExpr(SourceLocation source, Type type, java.lang.String name)
           
  FieldAccessExpr(Type type, java.lang.String name)
           
 
Method Summary
 MethodDec buildAccessMethod(org.aspectj.compiler.base.InnerAccessFixer w)
          Builds a method that would perform the actions of this expression.
protected  void cgAssignment(org.aspectj.compiler.base.bcg.CodeBuilder cb)
          Generate code to actually assign into this assignable.
protected  void cgDupLvalue(org.aspectj.compiler.base.bcg.CodeBuilder cb)
          Generates code to duplicate the top lvalue on the stack.
protected  void cgDupRvalue(org.aspectj.compiler.base.bcg.CodeBuilder cb)
          Generates code to duplicate the top rvalue on the stack and places it BELOW the lvalue that may be just below it.
protected  void cgLtoRvalue(org.aspectj.compiler.base.bcg.CodeBuilder cb)
          Generate code to remove the lvalue at the top of the stack (if any) and place the appropriate rvalue on the stack.
protected  void cgLvalue(org.aspectj.compiler.base.bcg.CodeBuilder cb)
          Generate code to place the lvalue of this expression on the top of the stack.
 void checkSpec()
           
 ASTObject copyWalk(CopyWalker walker)
           
protected  Type discoverType()
           
 ASTObject fixAccessPost(org.aspectj.compiler.crosscuts.AccessFixer fixer)
           
 ASTObject getChildAt(int childIndex)
           
 int getChildCount()
           
 java.lang.String getChildNameAt(int childIndex)
           
 java.lang.String getDefaultDisplayName()
           
 Expr getExpr()
           
 Field getField()
           
 FieldDec getFieldDec()
           
 java.lang.String getId()
           
 boolean getIsSuper()
           
 SemanticObject getTarget()
           
 Type getTargetType()
           
 boolean hasLegalProtectedAccess(Type fromType)
          Section 6.6.2.1 from JLSv2 E.Id requires that E is subtype of S
 boolean isBare()
           
 ASTObject postAssignmentCheck(org.aspectj.compiler.base.AssignmentCheckerPass walker)
           
 ASTObject postFixAST(org.aspectj.compiler.base.ASTFixerPass fixer)
           
 ASTObject postInnerAccess(org.aspectj.compiler.base.InnerAccessFixer w)
          Converts an expression accessing inaccessable context to one that is legal.
 void postInnerInfo(org.aspectj.compiler.base.InnerInfoPass w)
           
 ASTObject postMove(MovingWalker walker)
           
 void setChildAt(int childIndex, ASTObject child)
           
 void setExpr(Expr _expr)
           
 void setField(Field _field)
           
 void setIsSuper(boolean _isSuper)
           
 void setTarget(SemanticObject newTarget)
           
 Expr toExpr()
           
 void unparse(org.aspectj.compiler.base.CodeWriter writer)
           
 void walkFlow(org.aspectj.compiler.base.FlowCheckerPass w)
           
 void walkForwardReference(org.aspectj.compiler.base.ForwardReferenceChecker w)
           
 
Methods inherited from class org.aspectj.compiler.base.ast.AssignableExpr
cgValue, isIncable, isLhs
 
Methods inherited from class org.aspectj.compiler.base.ast.Expr
assertType, canBeCopied, cgBuffer, cgEffect, cgTest, cgValue, cleanup, getType, isAssignableTo, isConstantFalse, isConstantTrue, isConstantZero, isInConstructorCallExpr, isInExprStmt, isLegalStmt, isMethodConvertableTo, isUltimatelyLiteral, makeQualifiedThis, makeReference, postCopy, setType, showOperatorTypeError, showOperatorTypeError, walkCleanup, walkFrameLoc
 
Methods inherited from class org.aspectj.compiler.base.ast.ASTObject
addComment, checkNoSharing, clearComment, clearParent, contains, containsTypes, copy, display, fixAST, fromSource, getAST, getBeginColumn, getBeginLine, getBytecodeType, getBytecodeTypeDec, getComment, getCompilationUnit, getDeclaringType, getEnclosingCodeDec, getEnclosingDec, getEndColumn, getEndLine, getEndPosition, getFormalComment, getLexicalType, getOutermostBytecodeType, getOutermostLexicalType, getParent, getSourceDirectoryName, getSourceFile, getSourceFileName, getSourceLocation, getStartPosition, hasSource, hasSourceLocation, implementMixin, indexOf, inStaticContext, isLanguageVisible, isLeaf, isSynthetic, makeChild, makeChild, postCleanup, postImplementMixin, postLift, postScope, postThreading, preAssignmentCheck, preCopy, preIntroduction, preLift, preMove, preScope, preThreading, remove, remove, removeChildAt, replaceWith, setFormalComment, setParent, setParents, setSource, setSourceLocation, setSyntheticSource, showError, showMessage, showTypeError, showWarning, toShortString, toString, unparse, walk, walkAnalysis, walkAssignmentCheck, walkInnerInfo, walkMemberMunger, walkScope
 
Methods inherited from class org.aspectj.compiler.base.CompilerObject
getCompiler, getOptions, getTypeManager, getWorld
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

expr

protected Expr expr

field

protected Field field

isSuper

protected boolean isSuper
Constructor Detail

FieldAccessExpr

public FieldAccessExpr(SourceLocation source,
                       Type type,
                       java.lang.String name)

FieldAccessExpr

public FieldAccessExpr(SourceLocation source,
                       Expr expr,
                       java.lang.String name)

FieldAccessExpr

public FieldAccessExpr(Type type,
                       java.lang.String name)

FieldAccessExpr

public FieldAccessExpr(Expr expr,
                       java.lang.String name)

FieldAccessExpr

public FieldAccessExpr(Expr expr,
                       Identifier name)

FieldAccessExpr

public FieldAccessExpr(SourceLocation location,
                       Expr _expr,
                       Field _field,
                       boolean _isSuper)

FieldAccessExpr

protected FieldAccessExpr(SourceLocation source)
Method Detail

getFieldDec

public FieldDec getFieldDec()

discoverType

protected Type discoverType()
Specified by:
discoverType in class Expr

toExpr

public Expr toExpr()

walkFlow

public void walkFlow(org.aspectj.compiler.base.FlowCheckerPass w)
Overrides:
walkFlow in class ASTObject

isBare

public boolean isBare()

postInnerInfo

public void postInnerInfo(org.aspectj.compiler.base.InnerInfoPass w)
Overrides:
postInnerInfo in class ASTObject

hasLegalProtectedAccess

public boolean hasLegalProtectedAccess(Type fromType)
Section 6.6.2.1 from JLSv2 E.Id requires that E is subtype of S

Overrides:
hasLegalProtectedAccess in class ASTObject

checkSpec

public void checkSpec()
Overrides:
checkSpec in class Expr

walkForwardReference

public void walkForwardReference(org.aspectj.compiler.base.ForwardReferenceChecker w)
Overrides:
walkForwardReference in class ASTObject

postAssignmentCheck

public ASTObject postAssignmentCheck(org.aspectj.compiler.base.AssignmentCheckerPass walker)
Overrides:
postAssignmentCheck in class ASTObject

fixAccessPost

public ASTObject fixAccessPost(org.aspectj.compiler.crosscuts.AccessFixer fixer)
Overrides:
fixAccessPost in class ASTObject

getId

public java.lang.String getId()

postMove

public ASTObject postMove(MovingWalker walker)
Overrides:
postMove in class ASTObject

postFixAST

public ASTObject postFixAST(org.aspectj.compiler.base.ASTFixerPass fixer)
Overrides:
postFixAST in class ASTObject

getTarget

public SemanticObject getTarget()
Specified by:
getTarget in interface SOLink

setTarget

public void setTarget(SemanticObject newTarget)
Specified by:
setTarget in interface SOLink

getTargetType

public Type getTargetType()

unparse

public void unparse(org.aspectj.compiler.base.CodeWriter writer)
Overrides:
unparse in class ASTObject

postInnerAccess

public ASTObject postInnerAccess(org.aspectj.compiler.base.InnerAccessFixer w)
Description copied from class: ASTObject
Converts an expression accessing inaccessable context to one that is legal.

Overrides:
postInnerAccess in class ASTObject

buildAccessMethod

public MethodDec buildAccessMethod(org.aspectj.compiler.base.InnerAccessFixer w)
Description copied from class: ASTObject
Builds a method that would perform the actions of this expression. The InnerAccessFixer object keeps a cache of such methods to provide to the InnerAccessFixer walk, but if no appropriate method has yet been built, the original expression is the one that knows how to build it. This should only be overridden in PrefixExpr, PostfixExpr, FieldAccessExpr, AssignExpr, and CallExpr. If and when we do cookie methods for constructor, we may also need to override this in NewInstanceExpr and ConstructorCallExpr.

Overrides:
buildAccessMethod in class ASTObject

cgLvalue

protected void cgLvalue(org.aspectj.compiler.base.bcg.CodeBuilder cb)
Description copied from class: AssignableExpr
Generate code to place the lvalue of this expression on the top of the stack. Only assignable expressions have lvalues. Some assignable expressions (such as static field access expressions) do not have lvalues, and for them this method is a noop.

Specified by:
cgLvalue in class AssignableExpr

cgLtoRvalue

protected void cgLtoRvalue(org.aspectj.compiler.base.bcg.CodeBuilder cb)
Description copied from class: AssignableExpr
Generate code to remove the lvalue at the top of the stack (if any) and place the appropriate rvalue on the stack. Assumes that said lvalue was generated by this expression.

Specified by:
cgLtoRvalue in class AssignableExpr

cgAssignment

protected void cgAssignment(org.aspectj.compiler.base.bcg.CodeBuilder cb)
Description copied from class: AssignableExpr
Generate code to actually assign into this assignable. Assumes that the new rvalue is at the top of the stack, and that this expression's lvalue (if any) is just below it.

Specified by:
cgAssignment in class AssignableExpr

cgDupLvalue

protected void cgDupLvalue(org.aspectj.compiler.base.bcg.CodeBuilder cb)
Description copied from class: AssignableExpr
Generates code to duplicate the top lvalue on the stack. Assumes that said lvalue on the stack was generated by this expression.

Specified by:
cgDupLvalue in class AssignableExpr

cgDupRvalue

protected void cgDupRvalue(org.aspectj.compiler.base.bcg.CodeBuilder cb)
Description copied from class: AssignableExpr
Generates code to duplicate the top rvalue on the stack and places it BELOW the lvalue that may be just below it. Assumes that said lvalue and rvalue on the stack were generated by this expression.

Specified by:
cgDupRvalue in class AssignableExpr

getExpr

public Expr getExpr()

setExpr

public void setExpr(Expr _expr)

getField

public Field getField()

setField

public void setField(Field _field)

getIsSuper

public boolean getIsSuper()

setIsSuper

public void setIsSuper(boolean _isSuper)

copyWalk

public ASTObject copyWalk(CopyWalker walker)
Overrides:
copyWalk in class ASTObject

getChildAt

public ASTObject getChildAt(int childIndex)
Overrides:
getChildAt in class ASTObject

getChildNameAt

public java.lang.String getChildNameAt(int childIndex)
Overrides:
getChildNameAt in class ASTObject

setChildAt

public void setChildAt(int childIndex,
                       ASTObject child)
Overrides:
setChildAt in class ASTObject

getChildCount

public int getChildCount()
Overrides:
getChildCount in class ASTObject

getDefaultDisplayName

public java.lang.String getDefaultDisplayName()
Overrides:
getDefaultDisplayName in class AssignableExpr