|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jdt.internal.compiler.ast.ASTNode
org.eclipse.jdt.internal.compiler.ast.Statement
org.eclipse.jdt.internal.compiler.ast.Expression
org.eclipse.jdt.internal.compiler.ast.OperatorExpression
org.eclipse.jdt.internal.compiler.ast.ConditionalExpression
public class ConditionalExpression
Field Summary | |
---|---|
Expression |
condition
|
Constant |
optimizedBooleanConstant
|
Constant |
optimizedIfFalseConstant
|
Constant |
optimizedIfTrueConstant
|
Expression |
valueIfFalse
|
Expression |
valueIfTrue
|
Fields inherited from class org.eclipse.jdt.internal.compiler.ast.OperatorExpression |
---|
OperatorSignatures |
Fields inherited from class org.eclipse.jdt.internal.compiler.ast.Expression |
---|
constant, implicitConversion, resolvedType, statementEnd |
Fields inherited from interface org.eclipse.jdt.internal.compiler.ast.OperatorIds |
---|
AND, AND_AND, DIVIDE, EQUAL, EQUAL_EQUAL, GREATER, GREATER_EQUAL, INSTANCEOF, JML_ELEMTYPE, JML_EQUIV, JML_IMPLIES, JML_NONNULLELEMENTS, JML_NOT_ASSIGNED, JML_NOT_EQUIV, JML_NOT_MODIFIED, JML_OLD, JML_PRE, JML_REPRESENTS, JML_REV_IMPLIES, JML_TYPE, JML_TYPEOF, JmlOtherOpIdStart, LEFT_SHIFT, LESS, LESS_EQUAL, MINUS, MINUS_MINUS, MULTIPLY, NOT, NOT_EQUAL, NumberOfExtraTablesForJML, NumberOfTables, OR, OR_OR, PLUS, PLUS_PLUS, QUESTIONCOLON, REMAINDER, RIGHT_SHIFT, TWIDDLE, UNSIGNED_RIGHT_SHIFT, XOR |
Constructor Summary | |
---|---|
ConditionalExpression(Expression condition,
Expression valueIfTrue,
Expression valueIfFalse)
|
Method Summary | |
---|---|
FlowInfo |
analyseCode(BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo)
|
void |
generateCode(BlockScope currentScope,
CodeStream codeStream,
boolean valueRequired)
Code generation for the conditional operator ?: |
void |
generateOptimizedBoolean(BlockScope currentScope,
CodeStream codeStream,
BranchLabel trueLabel,
BranchLabel falseLabel,
boolean valueRequired)
Optimized boolean code generation for the conditional operator ?: |
boolean |
isDeclaredMonoNonNull()
|
boolean |
isDeclaredNonNull()
|
int |
nullStatus(FlowInfo flowInfo)
|
Constant |
optimizedBooleanConstant()
Constant usable for bytecode pattern optimizations, but cannot be inlined since it is not strictly equivalent to the definition of constant expressions. |
java.lang.StringBuffer |
printExpressionNoParenthesis(int indent,
java.lang.StringBuffer output)
|
TypeBinding |
resolveType(BlockScope scope)
Resolve the type of this expression in the context of a blockScope |
void |
traverse(ASTVisitor visitor,
BlockScope scope)
Traverse an expression in the context of a blockScope |
Methods inherited from class org.eclipse.jdt.internal.compiler.ast.OperatorExpression |
---|
classInitialize, generateTableTestCase, get_AND_AND, get_AND, get_DIVIDE, get_EQUAL_EQUAL, get_GREATER_EQUAL, get_GREATER, get_LEFT_SHIFT, get_LESS_EQUAL, get_LESS, get_MINUS, get_MULTIPLY, get_OR_OR, get_OR, get_PLUS, get_REMAINDER, get_RIGHT_SHIFT, get_UNSIGNED_RIGHT_SHIFT, get_XOR, operatorToString, printExpression |
Methods inherited from class org.eclipse.jdt.internal.compiler.ast.Statement |
---|
branchChainTo, complainIfUnreachable, generateArguments, isEmptyBlock, isValidJavaStatement, resolveCase |
Methods inherited from class org.eclipse.jdt.internal.compiler.ast.ASTNode |
---|
checkInvocationArguments, concreteStatement, isFieldUseDeprecated, isImplicitThis, isMethodUseDeprecated, isSuper, isThis, isTypeUseDeprecated, printAnnotations, printIndent, printModifiers, resolveAnnotations, resolveDeprecatedAnnotations, sourceEnd, sourceStart, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public Expression condition
public Expression valueIfTrue
public Expression valueIfFalse
public Constant optimizedBooleanConstant
public Constant optimizedIfTrueConstant
public Constant optimizedIfFalseConstant
Constructor Detail |
---|
public ConditionalExpression(Expression condition, Expression valueIfTrue, Expression valueIfFalse)
Method Detail |
---|
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo)
analyseCode
in class Expression
public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired)
generateCode
in class Expression
currentScope
- org.eclipse.jdt.internal.compiler.lookup.BlockScopecodeStream
- org.eclipse.jdt.internal.compiler.codegen.CodeStreamvalueRequired
- booleanpublic void generateOptimizedBoolean(BlockScope currentScope, CodeStream codeStream, BranchLabel trueLabel, BranchLabel falseLabel, boolean valueRequired)
generateOptimizedBoolean
in class Expression
public int nullStatus(FlowInfo flowInfo)
nullStatus
in class OperatorExpression
public boolean isDeclaredNonNull()
isDeclaredNonNull
in class Expression
public boolean isDeclaredMonoNonNull()
isDeclaredMonoNonNull
in class Expression
public Constant optimizedBooleanConstant()
Expression
optimizedBooleanConstant
in class Expression
public java.lang.StringBuffer printExpressionNoParenthesis(int indent, java.lang.StringBuffer output)
printExpressionNoParenthesis
in class OperatorExpression
public TypeBinding resolveType(BlockScope scope)
Expression
resolveType
in class Expression
public void traverse(ASTVisitor visitor, BlockScope scope)
Expression
traverse
in class Expression
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |