org.aspectj.compiler.base.ast
Class AssignExpr

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.BangExpr
                      extended byorg.aspectj.compiler.base.ast.AssignExpr
Direct Known Subclasses:
AddAssignExpr, BasicAssignExpr, BitwiseAssignExpr, NumericAssignExpr, ShiftAssignExpr

public abstract class AssignExpr
extends BangExpr


Field Summary
protected  java.lang.String op
           
protected  Expr rhs
           
 
Fields inherited from class org.aspectj.compiler.base.ast.BangExpr
lhs
 
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
protected AssignExpr(SourceLocation source)
           
  AssignExpr(SourceLocation location, AssignableExpr _lhs, java.lang.String _op, Expr _rhs)
           
 
Method Summary
static AssignExpr build(SourceLocation source, AssignableExpr rand1, java.lang.String op, Expr rand2)
           
 MethodDec buildAccessMethod(org.aspectj.compiler.base.InnerAccessFixer w)
          Builds a method that would perform the actions of this expression.
 ASTObject fixAccessToFieldSet(FieldAccessExpr expr)
           
 ASTObject getChildAt(int childIndex)
           
 int getChildCount()
           
 java.lang.String getChildNameAt(int childIndex)
           
 java.lang.String getDefaultDisplayName()
           
 java.lang.String getOp()
           
 Expr getRhs()
           
 Expr makeReference()
          When called for the first time will return an expression that may involve computation and state changes.
 ASTObject postAssignmentCheck(org.aspectj.compiler.base.AssignmentCheckerPass walker)
           
 ASTObject postInnerAccess(org.aspectj.compiler.base.InnerAccessFixer w)
          Converts an expression accessing inaccessable context to one that is legal.
 void setChildAt(int childIndex, ASTObject child)
           
 void setOp(java.lang.String _op)
           
 void setRhs(Expr _rhs)
           
 void unparse(org.aspectj.compiler.base.CodeWriter writer)
           
 void walkFlow(org.aspectj.compiler.base.FlowCheckerPass w)
           
 
Methods inherited from class org.aspectj.compiler.base.ast.BangExpr
discoverType, fixAccessPost, getLhs, isLegalStmt, setLhs
 
Methods inherited from class org.aspectj.compiler.base.ast.Expr
assertType, canBeCopied, cgBuffer, cgEffect, cgTest, cgValue, cgValue, checkSpec, cleanup, getType, isAssignableTo, isConstantFalse, isConstantTrue, isConstantZero, isInConstructorCallExpr, isInExprStmt, isMethodConvertableTo, isUltimatelyLiteral, makeQualifiedThis, postCopy, setType, showOperatorTypeError, showOperatorTypeError, walkCleanup, walkFrameLoc
 
Methods inherited from class org.aspectj.compiler.base.ast.ASTObject
addComment, checkNoSharing, clearComment, clearParent, contains, containsTypes, copy, copyWalk, 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, hasLegalProtectedAccess, hasSource, hasSourceLocation, implementMixin, indexOf, inStaticContext, isLanguageVisible, isLeaf, isSynthetic, makeChild, makeChild, postCleanup, postFixAST, postImplementMixin, postInnerInfo, postLift, postMove, 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, walkForwardReference, 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

op

protected java.lang.String op

rhs

protected Expr rhs
Constructor Detail

AssignExpr

public AssignExpr(SourceLocation location,
                  AssignableExpr _lhs,
                  java.lang.String _op,
                  Expr _rhs)

AssignExpr

protected AssignExpr(SourceLocation source)
Method Detail

fixAccessToFieldSet

public ASTObject fixAccessToFieldSet(FieldAccessExpr expr)
Specified by:
fixAccessToFieldSet in class BangExpr

unparse

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

makeReference

public Expr makeReference()
Description copied from class: Expr
When called for the first time will return an expression that may involve computation and state changes. When called on an Expr returned from this method, it is guaranteed that no further computation will occur. For Exprs that are already references, this is copied identity. For others, this will return a ReferenceExpr.

Overrides:
makeReference in class Expr

walkFlow

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

postAssignmentCheck

public ASTObject postAssignmentCheck(org.aspectj.compiler.base.AssignmentCheckerPass walker)
Overrides:
postAssignmentCheck 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

build

public static AssignExpr build(SourceLocation source,
                               AssignableExpr rand1,
                               java.lang.String op,
                               Expr rand2)

getOp

public java.lang.String getOp()

setOp

public void setOp(java.lang.String _op)

getRhs

public Expr getRhs()

setRhs

public void setRhs(Expr _rhs)

getChildAt

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

getChildNameAt

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

setChildAt

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

getChildCount

public int getChildCount()
Overrides:
getChildCount in class BangExpr

getDefaultDisplayName

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