Extension SDK

oracle.jdeveloper.jot
Interface JotHasChildStatement

All Superinterfaces:
JotBlockElement, JotElement, JotStatement
All Known Subinterfaces:
JotConditional, JotDo, JotElse, JotFor, JotIf, JotWhile

public interface JotHasChildStatement
extends JotStatement

The JotHasChildStatement interface describes statements that can contain a single sub-statement.

Since:
5.0

Field Summary
 
Fields inherited from interface oracle.jdeveloper.jot.JotStatement
BLOCK_STATEMENT, BREAK_STATEMENT, CASE_CLAUSE, CONTINUE_STATEMENT, DO_STATEMENT, ELSE_CLAUSE, EMPTY_STATEMENT, EXPRESSION_STATEMENT, FOR_STATEMENT, IF_STATEMENT, RETURN_STATEMENT, SWITCH_STATEMENT, SYNCHRONIZED_STATEMENT, THROW_STATEMENT, TRY_STATEMENT, WHILE_STATEMENT
 
Fields inherited from interface oracle.jdeveloper.jot.JotBlockElement
LOCAL_CLASS_TYPE, STATEMENT_TYPE, VARIABLE_DECLARATION_TYPE
 
Method Summary
 JotBlockStatement addBlock()
          Adds a new block statement as the sub-statement.
 JotBreak addBreak()
          Adds a new break statement as the sub-statement.
 JotContinue addContinue()
          Adds a new continue statement as the sub-statement.
 JotDo addDo(java.lang.String condition)
          Adds a new do statement as the sub-statement.
 JotExpressionStatement addExpressionStatement(JotStatementExpression exp)
          Adds a new expression statement as the sub-statement.
 JotExpressionStatement addExpressionStatement(java.lang.String exp)
          Adds a new expression statement as the sub-statement.
 JotFor addFor()
          Adds a new for statement as the sub-statement.
 JotIf addIf(java.lang.String exp)
          Adds a new if statement as the sub-statement.
 JotReturn addReturn(java.lang.String exp)
          Adds a new return statement as the sub-statement.
 JotStatement addStatement(java.lang.String text)
          Adds a new statement as the sub-statement.
 JotSwitch addSwitch(java.lang.String exp)
          Adds a new switch statement as the sub-statement.
 JotSynchronized addSynchronized(java.lang.String exp)
          Adds a new synchronized statement as the sub-statement.
 JotThrow addThrow(java.lang.String exp)
          Adds a new throw statement as the sub-statement.
 JotTry addTry()
          Adds a new try statement as the sub-statement.
 JotWhile addWhile(java.lang.String condition)
          Adds a new while statement as the sub-statement.
 JotAssignment createAssignment(java.lang.String variable, java.lang.String value)
          Creates a new assignment.
 JotMethodCall createMethodCall(java.lang.String object, java.lang.String method)
          Creates a new method call.
 JotNestedExpression createNestedMethodCall(JotMethodCall firstCall, JotMethodCall secondCall)
          Creates a new nested method call.
 JotStatement getChildStatement()
          Retrieves the sub-statement associated with this statement.
 
Methods inherited from interface oracle.jdeveloper.jot.JotStatement
addLabel, getAsBlock, getAsBreak, getAsCase, getAsContinue, getAsDo, getAsExpressionStatement, getAsFor, getAsIf, getAsReturn, getAsSwitch, getAsSynchronized, getAsThrow, getAsTry, getAsWhile, getLabels, getStatementText, getStatementType, removeLabel
 
Methods inherited from interface oracle.jdeveloper.jot.JotBlockElement
getAsLocalClass, getAsStatement, getAsVariableDeclaration, getElementType
 
Methods inherited from interface oracle.jdeveloper.jot.JotElement
getElementName, getEndOffset, getID, getJotWorkArea, getParent, getStartOffset, isExistent, isReadOnly, isStructureKnown, setParent
 

Method Detail

addBlock

public JotBlockStatement addBlock()
Adds a new block statement as the sub-statement. Any existing sub-statement is removed.

Returns:
the JotBlockStatement representing the new block.

addBreak

public JotBreak addBreak()
Adds a new break statement as the sub-statement. Any existing sub-statement is removed.

Returns:
the JotBreak representing the break statement.

addContinue

public JotContinue addContinue()
Adds a new continue statement as the sub-statement. Any existing sub-statement is removed.

Returns:
the JotContinue representing the continue statement.

addReturn

public JotReturn addReturn(java.lang.String exp)
Adds a new return statement as the sub-statement. Any existing sub-statement is removed.

Parameters:
exp - the return expression; null create return without a value;
Returns:
the JotReturn representing the return statement.

addThrow

public JotThrow addThrow(java.lang.String exp)
Adds a new throw statement as the sub-statement. Any existing sub-statement is removed.

Parameters:
exp - the value being thrown.
Returns:
the JotThrow representing the throw statement.

addDo

public JotDo addDo(java.lang.String condition)
Adds a new do statement as the sub-statement. Any existing sub-statement is removed.

Parameters:
condition - the conditional expression.
Returns:
the JotDo representing the do statement.

addWhile

public JotWhile addWhile(java.lang.String condition)
Adds a new while statement as the sub-statement. Any existing sub-statement is removed.

Parameters:
condition - the conditional expression.
Returns:
the JotWhile representing the while statement.

addIf

public JotIf addIf(java.lang.String exp)
Adds a new if statement as the sub-statement. Any existing sub-statement is removed.

Parameters:
exp - the conditional expression.
Returns:
the JotIf representing the if statement.

addFor

public JotFor addFor()
Adds a new for statement as the sub-statement. Any existing sub-statement is removed.

Returns:
the JotFor representing the for statement.

addSwitch

public JotSwitch addSwitch(java.lang.String exp)
Adds a new switch statement as the sub-statement. Any existing sub-statement is removed.

Parameters:
exp - the expression being switched on.
Returns:
the JotSwitch representing the switch statement.

addSynchronized

public JotSynchronized addSynchronized(java.lang.String exp)
Adds a new synchronized statement as the sub-statement. Any existing sub-statement is removed.

Parameters:
exp - the expression being synchronized on.
Returns:
the JotSynchronized representing the synchronized statement.

addExpressionStatement

public JotExpressionStatement addExpressionStatement(java.lang.String exp)
Adds a new expression statement as the sub-statement. Any existing sub-statement is removed.

Parameters:
exp - the expression being wrapped.
Returns:
the JotExpressionStatement representing the expression statement.

addExpressionStatement

public JotExpressionStatement addExpressionStatement(JotStatementExpression exp)
Adds a new expression statement as the sub-statement. Any existing sub-statement is removed.

Parameters:
exp - the statement expression to wrap.
Returns:
the JotExpressionStatement representing the expression statement.

addTry

public JotTry addTry()
Adds a new try statement as the sub-statement. Any existing sub-statement is removed.

Returns:
the JotTry representing the try statement.

addStatement

public JotStatement addStatement(java.lang.String text)
                          throws JotException
Adds a new statement as the sub-statement. The statement text should properly terminated. Blocks should include the braces.

Parameters:
text - the text of the new statement.
Throws:
JotException - if the new text cannot be parsed into a single statement.

createMethodCall

public JotMethodCall createMethodCall(java.lang.String object,
                                      java.lang.String method)
Creates a new method call. This method call should then be added to the code block by calling addExpressionStatement or added to a nested method call by calling createNestedMethodCall.

Parameters:
object - the object on which the method call is being made.
method - the name of the method being invoked.
Returns:
the JotMethodCall representing the method call.
See Also:
addExpressionStatement(JotStatementExpression), createNestedMethodCall(JotMethodCall, JotMethodCall)

createNestedMethodCall

public JotNestedExpression createNestedMethodCall(JotMethodCall firstCall,
                                                  JotMethodCall secondCall)
Creates a new nested method call. A nested method call consists of two method calls connected with the '.' operator; for example, foo().bar().

Parameters:
firstCall - the first method call.
secondCall - the second method call.
Returns:
the JotNestedExpression representing the nested method call.
See Also:
createMethodCall(String, String)

createAssignment

public JotAssignment createAssignment(java.lang.String variable,
                                      java.lang.String value)
Creates a new assignment. This assignment should then be added to the code block by calling addExpressionStatement.

Parameters:
variable - the variable (or left side) of the assignment.
value - the expression being assigned to the variable.
Returns:
the JotAssignment representing the assignment.
See Also:
addExpressionStatement(JotStatementExpression)

getChildStatement

public JotStatement getChildStatement()
Retrieves the sub-statement associated with this statement.

Returns:
the sub-statement.

Extension SDK

 

Copyright ©1997, 2003, Oracle. All rights reserved.