Top Description Fields Constructors Methods
com.sun.codemodel

public Class JConditional

extends Object
implements JStatement
Class Inheritance
All Implemented Interfaces
com.sun.codemodel.JStatement

If statement, with optional else clause

Field Summary

Modifier and TypeField and Description
private JBlock
_else

JBlock of statements for optional "else" clause

private JBlock
_then

JBlock of statements for "then" clause

private JExpression
test

JExpression to test to determine branching

Constructor Summary

AccessConstructor and Description
pack-priv
JConditional(JExpression
JExpression which will determine branching
test
)

Constructor

Method Summary

Modifier and TypeMethod and Description
public JBlock

Returns:

Newly generated else block
_else
()

Create a block to be executed by "else" branch

public JConditional
_elseif(JExpression boolExp)

Creates ...

public JBlock

Returns:

Then block
_then
()

Return the block to be excuted by the "then" branch

public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_elseback to summary
private JBlock _else

JBlock of statements for optional "else" clause

_thenback to summary
private JBlock _then

JBlock of statements for "then" clause

testback to summary
private JExpression test

JExpression to test to determine branching

Constructor Detail

JConditionalback to summary
pack-priv JConditional(JExpression test)

Constructor

Parameters
test:JExpression

JExpression which will determine branching

Method Detail

_elseback to summary
public JBlock _else()

Create a block to be executed by "else" branch

Returns:JBlock

Newly generated else block

_elseifback to summary
public JConditional _elseif(JExpression boolExp)

Creates ... else if(...) ... code.

_thenback to summary
public JBlock _then()

Return the block to be excuted by the "then" branch

Returns:JBlock

Then block

stateback to summary
public void state(JFormatter f)

Implements com.sun.codemodel.JStatement.state.

Annotations
@Override