org.aspectj.compiler.base.ast
Class ParenExpr

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

public class ParenExpr
extends Expr


Field Summary
protected  Expr expr
           
 
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 ParenExpr(SourceLocation source)
           
  ParenExpr(SourceLocation location, Expr _expr)
           
 
Method Summary
protected  void bindNamesSelf()
           
 boolean canBeCopied()
          Can this expression be copied without changing the semantics of the program.
protected  void cgBuffer(org.aspectj.compiler.base.bcg.CodeBuilder cb)
          Evaluates the expression in a context where the top of the stack contains a StringBuffer object.
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 cgTest(org.aspectj.compiler.base.bcg.CodeBuilder cb, org.aspectj.compiler.base.bcg.Label tdest, org.aspectj.compiler.base.bcg.Label fdest)
          Evaluates the expression in a context where its value will only be used to branch (from IfStmt, TriTestExpr, WhileStmt, DoStmt, and ForStmt).
protected  void cgValue(org.aspectj.compiler.base.bcg.CodeBuilder cb)
          Leaves the value of this expression on the stack.
protected  void cgValue(org.aspectj.compiler.base.bcg.CodeBuilder cb, Type castTo)
          Leaves the value of this expression on the stack and casts the value to castTo.
 ASTObject copyWalk(CopyWalker walker)
           
protected  Type discoverType()
           
 ASTObject getChildAt(int childIndex)
           
 int getChildCount()
           
 java.lang.String getChildNameAt(int childIndex)
           
 java.lang.String getDefaultDisplayName()
           
 Expr getExpr()
           
 boolean isUltimatelyLiteral()
          Is this expression ultimately a literal expression.
 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)
           
 void setChildAt(int childIndex, ASTObject child)
           
 void setExpr(Expr _expr)
           
 void unparse(org.aspectj.compiler.base.CodeWriter writer)
           
 
Methods inherited from class org.aspectj.compiler.base.ast.Expr
assertType, checkSpec, cleanup, getType, isAssignableTo, isConstantFalse, isConstantTrue, isConstantZero, isInConstructorCallExpr, isInExprStmt, isLegalStmt, isMethodConvertableTo, makeQualifiedThis, postCopy, setType, showOperatorTypeError, showOperatorTypeError, walkCleanup, walkFrameLoc
 
Methods inherited from class org.aspectj.compiler.base.ast.ASTObject
addComment, buildAccessMethod, checkNoSharing, clearComment, clearParent, contains, containsTypes, copy, display, fixAccessPost, 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, postInnerAccess, 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, walkFlow, 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

expr

protected Expr expr
Constructor Detail

ParenExpr

public ParenExpr(SourceLocation location,
                 Expr _expr)

ParenExpr

protected ParenExpr(SourceLocation source)
Method Detail

bindNamesSelf

protected void bindNamesSelf()

discoverType

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

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

canBeCopied

public boolean canBeCopied()
Description copied from class: Expr
Can this expression be copied without changing the semantics of the program.

Overrides:
canBeCopied in class Expr

isUltimatelyLiteral

public boolean isUltimatelyLiteral()
Description copied from class: Expr
Is this expression ultimately a literal expression. The only difference between this and canBeCopied is that 'this' is NOT ultimatelyLiteral, and that a cast is only copiable if its expression is ultimatelyLiteral.

Overrides:
isUltimatelyLiteral in class Expr

unparse

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

postAssignmentCheck

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

cgValue

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

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

cgBuffer

protected void cgBuffer(org.aspectj.compiler.base.bcg.CodeBuilder cb)
Description copied from class: Expr
Evaluates the expression in a context where the top of the stack contains a StringBuffer object. The value of this expression is then appended into the StringBuffer. This is used in evaluating the String + operator. May self-call Expr.cgValue(CodeBuilder).

Overrides:
cgBuffer in class Expr

cgTest

protected void cgTest(org.aspectj.compiler.base.bcg.CodeBuilder cb,
                      org.aspectj.compiler.base.bcg.Label tdest,
                      org.aspectj.compiler.base.bcg.Label fdest)
Description copied from class: Expr
Evaluates the expression in a context where its value will only be used to branch (from IfStmt, TriTestExpr, WhileStmt, DoStmt, and ForStmt). The expression, of course, will have boolean type. By default, this evaluates the expression to the stack and then emits an EQ/NE branch bytecode, but many expressions such as tests in BinopExpr will be able to do much better. May self-call Expr.cgValue(CodeBuilder).

Overrides:
cgTest in class Expr

getExpr

public Expr getExpr()

setExpr

public void setExpr(Expr _expr)

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 Expr