org.aspectj.compiler.base.ast
Class PrefixExpr

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.PrefixExpr

public class PrefixExpr
extends BangExpr


Field Summary
protected  java.lang.String op
           
 
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 PrefixExpr(SourceLocation source)
           
  PrefixExpr(SourceLocation location, AssignableExpr _lhs, java.lang.String _op)
           
 
Method Summary
 MethodDec buildAccessMethod(org.aspectj.compiler.base.InnerAccessFixer w)
          Builds a method that would perform the actions of this expression.
protected  void cgEffect(org.aspectj.compiler.base.bcg.CodeBuilder cb)
          Evaluates the expression in a context where its value is unnecessary (i.e., from ExprStmt, or in a FieldAccessExpr when the field is static but there is an expression there nonetheless).
protected  void cgValue(org.aspectj.compiler.base.bcg.CodeBuilder cb)
          Leaves the value of this expression on the stack.
 void checkSpec()
           
 ASTObject copyWalk(CopyWalker walker)
           
 ASTObject fixAccessToFieldSet(FieldAccessExpr expr)
           
 java.lang.String getDefaultDisplayName()
           
 java.lang.String getOp()
           
 ASTObject postInnerAccess(org.aspectj.compiler.base.InnerAccessFixer w)
          Converts an expression accessing inaccessable context to one that is legal.
 void setOp(java.lang.String _op)
           
 void unparse(org.aspectj.compiler.base.CodeWriter writer)
           
 
Methods inherited from class org.aspectj.compiler.base.ast.BangExpr
discoverType, fixAccessPost, getChildAt, getChildCount, getChildNameAt, getLhs, isLegalStmt, setChildAt, setLhs, walkFlow
 
Methods inherited from class org.aspectj.compiler.base.ast.Expr
assertType, canBeCopied, cgBuffer, cgTest, cgValue, cleanup, getType, isAssignableTo, isConstantFalse, isConstantTrue, isConstantZero, isInConstructorCallExpr, isInExprStmt, 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, hasLegalProtectedAccess, hasSource, hasSourceLocation, implementMixin, indexOf, inStaticContext, isLanguageVisible, isLeaf, isSynthetic, makeChild, makeChild, postAssignmentCheck, 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
Constructor Detail

PrefixExpr

public PrefixExpr(SourceLocation location,
                  AssignableExpr _lhs,
                  java.lang.String _op)

PrefixExpr

protected PrefixExpr(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

checkSpec

public void checkSpec()
Overrides:
checkSpec in class Expr

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

cgValue

protected void cgValue(org.aspectj.compiler.base.bcg.CodeBuilder cb)
Description copied from class: Expr
Leaves the value of this expression on the stack. May self-call Expr.cgTest(CodeBuilder, Label, Label).

Overrides:
cgValue in class Expr

cgEffect

protected void cgEffect(org.aspectj.compiler.base.bcg.CodeBuilder cb)
Description copied from class: Expr
Evaluates the expression in a context where its value is unnecessary (i.e., from ExprStmt, or in a FieldAccessExpr when the field is static but there is an expression there nonetheless). May self-call Expr.cgValue(CodeBuilder).

Overrides:
cgEffect in class Expr

getOp

public java.lang.String getOp()

setOp

public void setOp(java.lang.String _op)

copyWalk

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

getDefaultDisplayName

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