org.extendj.ast
node type ConditionalExpr

General Info

Production
ConditionalExpr : Expr ::= Condition:Expr TrueExpr:Expr FalseExpr:Expr;
Type Hierarchy:
java.lang.Object
  extended by beaver.Symbol
      extended by org.extendj.ast.ASTNode<ASTNode>
          extended by org.extendj.ast.Expr
              extended by org.extendj.ast.ConditionalExpr
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Iterable<ASTNode>, org.jastadd.util.PrettyPrintable

Description

Source
Declared in /home/jesper/git/extendj/java4/grammar/Java.ast at line 184

Member Filters

API level:

Aspect:

Constructors

public ConditionalExpr()
 
Source
Declared in /home/jesper/git/extendj/ASTNode at line 1
public ConditionalExpr(Expr p0,
                       Expr p1,
                       Expr p2)
 
Source
Declared in /home/jesper/git/extendj/ASTNode at line 13

Attributes

@ASTNodeAnnotation.Attribute
syn org.extendj.ast.Constant constant()
Overrides:constant in class Expr
Source
Declared in /home/jesper/git/extendj/java4/frontend/ConstantExpression.jrag at line 66
Aspect
ConstantExpression
Overrides:isConstant in class Expr
Source
Declared in /home/jesper/git/extendj/java4/frontend/ConstantExpression.jrag at line 265
Aspect
ConstantExpression
Source
Declared in /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag at line 253
Aspect
DA
@ASTNodeAnnotation.Attribute
syn boolean isDAafterTrue(org.extendj.ast.Variable v)
Overrides:isDAafterTrue in class Expr
Source
Declared in /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag at line 374
Aspect
DA
@ASTNodeAnnotation.Attribute
syn boolean isDAafterFalse(org.extendj.ast.Variable v)
Overrides:isDAafterFalse in class Expr
Source
Declared in /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag at line 375
Aspect
DA
@ASTNodeAnnotation.Attribute
syn boolean isDAafter(org.extendj.ast.Variable v)
Overrides:isDAafter in class Expr
Source
Declared in /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag at line 259
Aspect
DA
@ASTNodeAnnotation.Attribute
syn boolean isDUafterTrue(org.extendj.ast.Variable v)
Overrides:isDUafterTrue in class Expr
Source
Declared in /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag at line 791
Aspect
DU
@ASTNodeAnnotation.Attribute
syn boolean isDUafterFalse(org.extendj.ast.Variable v)
Overrides:isDUafterFalse in class Expr
Source
Declared in /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag at line 792
Aspect
DU
@ASTNodeAnnotation.Attribute
syn boolean isDUafter(org.extendj.ast.Variable v)
Overrides:isDUafter in class Expr
Source
Declared in /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag at line 783
Aspect
DU
Specified by:type in class Expr
Source
Declared in /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag at line 302
Aspect
TypeAnalysis
Overrides:canBeTrue in class Expr
Source
Declared in /home/jesper/git/extendj/java4/backend/CreateBCode.jrag at line 1022
Aspect
CreateBCode
Overrides:canBeFalse in class Expr
Source
Declared in /home/jesper/git/extendj/java4/backend/CreateBCode.jrag at line 1034
Aspect
CreateBCode
@ASTNodeAnnotation.Attribute
syn boolean modifiedInScope(org.extendj.ast.Variable var)
Overrides:modifiedInScope in class Expr
Source
Declared in /home/jesper/git/extendj/java7/frontend/PreciseRethrow.jrag at line 149
Aspect
PreciseRethrow
Overrides:compatibleStrictContext in class Expr
Source
Declared in /home/jesper/git/extendj/java8/frontend/MethodSignature.jrag at line 32
Aspect
MethodSignature18
Overrides:compatibleLooseContext in class Expr
Source
Declared in /home/jesper/git/extendj/java8/frontend/MethodSignature.jrag at line 79
Aspect
MethodSignature18
@ASTNodeAnnotation.Attribute
syn boolean pertinentToApplicability(Expr access,
                                                             BodyDecl decl,
                                                             int argIndex)
Overrides:pertinentToApplicability in class Expr
Source
Declared in /home/jesper/git/extendj/java8/frontend/MethodSignature.jrag at line 107
Aspect
MethodSignature18
Computes which type is more specific for a specific argument, as defined in 15.12.2.5
Overrides:moreSpecificThan in class Expr
Parameters:
type1 -
type2 -
Returns:
true if type1 is more specific than type2, false otherwise
Source
Declared in /home/jesper/git/extendj/java8/frontend/MethodSignature.jrag at line 233
Aspect
MethodSignature18
Overrides:potentiallyCompatible in class Expr
Source
Declared in /home/jesper/git/extendj/java8/frontend/MethodSignature.jrag at line 466
Aspect
MethodSignature18
Overrides:isBooleanExpression in class Expr
Source
Declared in /home/jesper/git/extendj/java8/frontend/PolyExpressions.jrag at line 29
Aspect
PolyExpressions
Source
Declared in /home/jesper/git/extendj/java8/frontend/PolyExpressions.jrag at line 55
Aspect
PolyExpressions
Overrides:isNumericExpression in class Expr
Source
Declared in /home/jesper/git/extendj/java8/frontend/PolyExpressions.jrag at line 59
Aspect
PolyExpressions
Source
Declared in /home/jesper/git/extendj/java8/frontend/PolyExpressions.jrag at line 74
Aspect
PolyExpressions
Source
Declared in /home/jesper/git/extendj/java8/frontend/PolyExpressions.jrag at line 77
Aspect
PolyExpressions
Overrides:isPolyExpression in class Expr
Source
Declared in /home/jesper/git/extendj/java8/frontend/PolyExpressions.jrag at line 80
Aspect
PolyExpressions
Overrides:assignConversionTo in class Expr
Source
Declared in /home/jesper/git/extendj/java8/frontend/PolyExpressions.jrag at line 142
Aspect
PolyExpressions

Methods

public void prettyPrint(org.jastadd.util.PrettyPrinter out)
Specified by:prettyPrint in interface org.jastadd.util.PrettyPrintableOverrides:prettyPrint in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/java4/frontend/PrettyPrint.jadd at line 177
Aspect
Java4PrettyPrint
public void typeCheck()
Overrides:typeCheck in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/java4/frontend/TypeCheck.jrag at line 648
Aspect
TypeCheck
public void createBCode(org.extendj.ast.CodeGeneration gen)
Overrides:createBCode in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/java4/backend/CreateBCode.jrag at line 1076
Aspect
CreateBCode
public void branchTrue(org.extendj.ast.CodeGeneration gen,
                       int target)
Description copied from class: ExprGenerate unboxing code for conditions 14.9 If, 14.12 While, 14.13 Do, 14.14 For branchTrue is used to emit the condition from these constructs refine behavior to include unboxing of the value when needed
Overrides:branchTrue in class Expr
Source
Declared in /home/jesper/git/extendj/java4/backend/CreateBCode.jrag at line 1169
Aspect
CreateBCode
public void branchFalse(org.extendj.ast.CodeGeneration gen,
                        int target)
Overrides:branchFalse in class Expr
Source
Declared in /home/jesper/git/extendj/java4/backend/CreateBCode.jrag at line 1284
Aspect
CreateBCode
public void emitBooleanCondition(org.extendj.ast.CodeGeneration gen)
Overrides:emitBooleanCondition in class Expr
Source
Declared in /home/jesper/git/extendj/java5/backend/AutoBoxingCodegen.jrag at line 464
Aspect
AutoBoxingCodegen
public void init$Children()
Initializes the child array to the correct size. Initializes List and Opt nta children.
Overrides:init$Children in class Expr
Source
Declared in /home/jesper/git/extendj/ASTNode at line 10
protected int numChildren()
Overrides:numChildren in class Expr
Source
Declared in /home/jesper/git/extendj/ASTNode at line 21
public boolean mayHaveRewrite()
Overrides:mayHaveRewrite in class Expr
Source
Declared in /home/jesper/git/extendj/ASTNode at line 27
public void flushAttrCache()
Overrides:flushAttrCache in class Expr
Source
Declared in /home/jesper/git/extendj/ASTNode at line 33
public void flushCollectionCache()
Overrides:flushCollectionCache in class Expr
Source
Declared in /home/jesper/git/extendj/ASTNode at line 55
public void flushRewriteCache()
Overrides:flushRewriteCache in class Expr
Source
Declared in /home/jesper/git/extendj/ASTNode at line 61
public ConditionalExpr clone()
                      throws java.lang.CloneNotSupportedException
Overrides:clone in class Expr
Throws:
java.lang.CloneNotSupportedException
Source
Declared in /home/jesper/git/extendj/ASTNode at line 67
public ConditionalExpr copy()
Overrides:copy in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/ASTNode at line 74
@Deprecated
public ConditionalExpr fullCopy()
Deprecated. Please use treeCopy or treeCopyNoTransform instead

Create a deep copy of the AST subtree at this node. The copy is dangling, i.e. has no parent.

Specified by:fullCopy in class Expr
Returns:
dangling copy of the subtree at this node
Source
Declared in /home/jesper/git/extendj/ASTNode at line 93
public ConditionalExpr treeCopyNoTransform()
Create a deep copy of the AST subtree at this node. The copy is dangling, i.e. has no parent.
Specified by:treeCopyNoTransform in class Expr
Returns:
dangling copy of the subtree at this node
Source
Declared in /home/jesper/git/extendj/ASTNode at line 103
public ConditionalExpr treeCopy()
Create a deep copy of the AST subtree at this node. The subtree of this node is traversed to trigger rewrites before copy. The copy is dangling, i.e. has no parent.
Specified by:treeCopy in class Expr
Returns:
dangling copy of the subtree at this node
Source
Declared in /home/jesper/git/extendj/ASTNode at line 123
protected boolean is$Equal(ASTNode node)
Overrides:is$Equal in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/ASTNode at line 130
public void setCondition(Expr node)
Replaces the Condition child.
Parameters:
node - The new node to replace the Condition child.
Retrieves the Condition child.
Returns:
The current node used as the Condition child.
Retrieves the Condition child.

This method does not invoke AST transformations.

Returns:
The current node used as the Condition child.
public void setTrueExpr(Expr node)
Replaces the TrueExpr child.
Parameters:
node - The new node to replace the TrueExpr child.
Retrieves the TrueExpr child.
Returns:
The current node used as the TrueExpr child.
Retrieves the TrueExpr child.

This method does not invoke AST transformations.

Returns:
The current node used as the TrueExpr child.
public void setFalseExpr(Expr node)
Replaces the FalseExpr child.
Parameters:
node - The new node to replace the FalseExpr child.
Retrieves the FalseExpr child.
Returns:
The current node used as the FalseExpr child.
Retrieves the FalseExpr child.

This method does not invoke AST transformations.

Returns:
The current node used as the FalseExpr child.
public boolean Define_isDAbefore(ASTNode caller,
                                 ASTNode child,
                                 org.extendj.ast.Variable v)
Overrides:Define_isDAbefore in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag at line 255
protected boolean canDefine_isDAbefore(ASTNode caller,
                                       ASTNode child,
                                       org.extendj.ast.Variable v)
public boolean Define_isDUbefore(ASTNode caller,
                                 ASTNode child,
                                 org.extendj.ast.Variable v)
Overrides:Define_isDUbefore in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag at line 779
protected boolean canDefine_isDUbefore(ASTNode caller,
                                       ASTNode child,
                                       org.extendj.ast.Variable v)
public TypeDecl Define_targetType(ASTNode caller,
                                  ASTNode child)
Overrides:Define_targetType in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/java8/frontend/TargetType.jrag at line 30
protected boolean canDefine_targetType(ASTNode caller,
                                       ASTNode child)
public boolean Define_assignmentContext(ASTNode caller,
                                        ASTNode child)
Overrides:Define_assignmentContext in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/java8/frontend/TargetType.jrag at line 196
protected boolean canDefine_assignmentContext(ASTNode caller,
                                              ASTNode child)
public boolean Define_invocationContext(ASTNode caller,
                                        ASTNode child)
Overrides:Define_invocationContext in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/java8/frontend/TargetType.jrag at line 197
protected boolean canDefine_invocationContext(ASTNode caller,
                                              ASTNode child)
public boolean Define_castContext(ASTNode caller,
                                  ASTNode child)
Overrides:Define_castContext in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/java8/frontend/TargetType.jrag at line 198
protected boolean canDefine_castContext(ASTNode caller,
                                        ASTNode child)
public boolean Define_numericContext(ASTNode caller,
                                     ASTNode child)
Overrides:Define_numericContext in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/java8/frontend/TargetType.jrag at line 200
protected boolean canDefine_numericContext(ASTNode caller,
                                           ASTNode child)
public boolean Define_stringContext(ASTNode caller,
                                    ASTNode child)
Overrides:Define_stringContext in class ASTNode<ASTNode>
Source
Declared in /home/jesper/git/extendj/java8/frontend/TargetType.jrag at line 199
protected boolean canDefine_stringContext(ASTNode caller,
                                          ASTNode child)
Overrides:rewriteTo in class Expr

Fields

protected boolean constant_computed
protected org.extendj.ast.Constant constant_value
protected boolean isConstant_computed
protected boolean isConstant_value
protected boolean booleanOperator_computed
protected boolean booleanOperator_value
protected boolean type_computed
protected boolean isBooleanExpression_value
protected boolean isBooleanConditional_value
protected boolean isNumericExpression_value
protected boolean isNumericConditional_value
protected boolean isPolyExpression_computed
protected boolean isPolyExpression_value
protected java.util.Map assignConversionTo_TypeDecl_values

Inherited Members

Attributes inherited from org.extendj.ast.Expr

Attributes inherited from org.extendj.ast.ASTNode

Methods inherited from class org.extendj.ast.Expr

Methods inherited from class org.extendj.ast.ASTNode

Methods inherited from class beaver.Symbol

getColumn
getEnd
getId
getLine
getStart
makePosition

Methods inherited from class java.lang.Object

equals
finalize
getClass
hashCode
notify
notifyAll
wait
wait
wait

Fields inherited from org.extendj.ast.Expr

Fields inherited from org.extendj.ast.ASTNode

Fields inherited from beaver.Symbol

end
id
start
value