org.aspectj.compiler.base.ast
Class BooleanLiteralExpr
java.lang.Object
org.aspectj.compiler.base.CompilerObject
org.aspectj.compiler.base.ast.ASTObject
org.aspectj.compiler.base.ast.Expr
org.aspectj.compiler.base.ast.JavaExpr
org.aspectj.compiler.base.ast.LiteralExpr
org.aspectj.compiler.base.ast.BooleanLiteralExpr
- All Implemented Interfaces:
- MajPrimaryExpr
- public class BooleanLiteralExpr
- extends LiteralExpr
|
Method Summary |
void |
addConstant(org.aspectj.compiler.base.bcg.FieldBuilder fb)
|
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. |
ASTObject |
copyWalk(CopyWalker walker)
|
boolean |
getBooleanValue()
|
java.lang.String |
getDefaultDisplayName()
|
java.lang.String |
getStringValue()
Return a string representing the Literal expr, NOT to be used
for unparsing purposes, but rather the string that would be
returned by the String.valueOf(char) method. |
boolean |
isConstantFalse()
is this expression the boolean literal value false? |
boolean |
isConstantTrue()
is this expression the boolean literal value true? |
void |
setBooleanValue(boolean _booleanValue)
|
Expr |
toExpr()
|
void |
walkFlow(org.aspectj.compiler.base.FlowCheckerPass w)
|
| Methods inherited from class org.aspectj.compiler.base.ast.LiteralExpr |
canBeCopied, cgEffect, cgValue, discoverType, getDoubleValue, getFloatValue, getIntValue, getLongValue, getType, getValue, isUltimatelyLiteral, makeReference, setType, setValue, unparse |
| Methods inherited from class org.aspectj.compiler.base.ast.Expr |
assertType, cgBuffer, checkSpec, cleanup, isAssignableTo, isConstantZero, isInConstructorCallExpr, isInExprStmt, isLegalStmt, isMethodConvertableTo, makeQualifiedThis, postCopy, 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, getChildAt, getChildCount, getChildNameAt, 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, postInnerAccess, postInnerInfo, postLift, postMove, postScope, postThreading, preAssignmentCheck, preCopy, preIntroduction, preLift, preMove, preScope, preThreading, remove, remove, removeChildAt, replaceWith, setChildAt, 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 |
booleanValue
protected boolean booleanValue
BooleanLiteralExpr
public BooleanLiteralExpr(SourceLocation source,
boolean _booleanValue)
BooleanLiteralExpr
public BooleanLiteralExpr(SourceLocation location,
Type _type,
java.lang.String _value,
boolean _booleanValue)
BooleanLiteralExpr
public BooleanLiteralExpr(boolean _booleanValue)
BooleanLiteralExpr
protected BooleanLiteralExpr(SourceLocation source)
toExpr
public Expr toExpr()
isConstantTrue
public boolean isConstantTrue()
- Description copied from class:
Expr
- is this expression the boolean literal value true?
- Overrides:
isConstantTrue in class Expr
isConstantFalse
public boolean isConstantFalse()
- Description copied from class:
Expr
- is this expression the boolean literal value false?
- Overrides:
isConstantFalse in class Expr
getStringValue
public java.lang.String getStringValue()
- Description copied from class:
LiteralExpr
- Return a string representing the Literal expr, NOT to be used
for unparsing purposes, but rather the string that would be
returned by the
String.valueOf(char) method.
- Specified by:
getStringValue in class LiteralExpr
walkFlow
public void walkFlow(org.aspectj.compiler.base.FlowCheckerPass w)
- Overrides:
walkFlow in class ASTObject
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
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
addConstant
public void addConstant(org.aspectj.compiler.base.bcg.FieldBuilder fb)
- Specified by:
addConstant in class LiteralExpr
getBooleanValue
public boolean getBooleanValue()
- Overrides:
getBooleanValue in class LiteralExpr
setBooleanValue
public void setBooleanValue(boolean _booleanValue)
copyWalk
public ASTObject copyWalk(CopyWalker walker)
- Overrides:
copyWalk in class ASTObject
getDefaultDisplayName
public java.lang.String getDefaultDisplayName()
- Overrides:
getDefaultDisplayName in class LiteralExpr