Extension SDK 9.0.5

oracle.jdeveloper.jot
Interface JotArrayInitializer

All Superinterfaces:
JotCodeElement, JotElement, JotExpression

public interface JotArrayInitializer
extends JotExpression

The JotArrayInitializer interface represents an array initialization expression. An array initialization expression is used as part of an array allocation expression to specify the values referenced by the array. Array initialization expressions have the form:

   new String[] { "One", "Two" }
   new int[][] { { 0, 0 }, { 0, 1 }, { 0, 2 } }
 

Since:
5.0
See Also:
JotArrayAllocation, "Section 15.10 of the Java Language Specification Second Edition"

Field Summary
 
Fields inherited from interface oracle.jdeveloper.jot.JotExpression
ANONYMOUS_CLASS_ALLOCATION_EXPRESSION, ARRAY_ALLOCATION_EXPRESSION, ARRAY_DEREFERENCE_EXPRESSION, ARRAY_INITIALIZER_EXPRESSION, ASSIGNMENT_EXPRESSION, CLASS_ALLOCATION_EXPRESSION, INFIX_EXPRESSION, METHOD_CALL_EXPRESSION, NESTED_EXPRESSION, POST_INC_OR_DEC_EXPRESSION, PRE_INC_OR_DEC_EXPRESSION, PRIMARY_EXPRESSION, QUESTION_EXPRESSION, TYPECAST_EXPRESSION, UNARY_EXPRESSION, UNCATEGORIZED_EXPRESSION
 
Method Summary
 JotExpression addExpression(JotExpression marker, boolean before, java.lang.String exp)
          Adds a new expression.
 JotExpression[] getExpressions()
          Retrieves the expressions that make up this array initialization expression.
 void removeExpression(JotExpression exp)
          Removes an existing expression.
 JotExpression setExpression(int idx, java.lang.String exp)
          Sets a specific expression.
 
Methods inherited from interface oracle.jdeveloper.jot.JotExpression
getAsAnonymousClass, getAsArrayAllocation, getAsArrayDereference, getAsArrayInitializer, getAsAssignment, getAsClassAllocation, getAsInfixExpression, getAsMethodCall, getAsNestedExpression, getAsPostIncrementOrDecrement, getAsPreIncrementOrDecrement, getAsPrimaryExpression, getAsQuestionExpression, getAsTypecast, getAsUnaryExpression, getExpressionString, getExpressionType, getMinimumReferenceName, isParenthesized, renameObjectReference, resolveTypeReference, setParenthesized
 
Methods inherited from interface oracle.jdeveloper.jot.JotCodeElement
addPrecedingComment, childrenContainErrors, delete, getContainingJotFile, getLeftWhitespace, getLength, getRightWhitespace, isInError, isSource, setLeftWhitespace, setRightWhitespace
 
Methods inherited from interface oracle.jdeveloper.jot.JotElement
getChildren, getContainedElements, getElementName, getElementType, getEndOffset, getID, getJotWorkArea, getParent, getStartOffset, isExistent, isReadOnly, isStructureKnown, setParent
 

Method Detail

getExpressions

public JotExpression[] getExpressions()
                               throws JotInvalidElementException
Retrieves the expressions that make up this array initialization expression.

Returns:
an array of JotExpressions
Throws:
JotInvalidElementException

setExpression

public JotExpression setExpression(int idx,
                                   java.lang.String exp)
                            throws JotInvalidElementException
Sets a specific expression.

Parameters:
idx - the index of the expression to set
exp - the new expression string
Returns:
the new expression as a JotExpression
Throws:
JotInvalidElementException

addExpression

public JotExpression addExpression(JotExpression marker,
                                   boolean before,
                                   java.lang.String exp)
                            throws JotInvalidElementException
Adds a new expression.

Parameters:
marker - the expression to position relative to.
before - whether to position the new expression before or after the marker expression; or, if the marker is null, whether to position the new expression at the beginning or the end of the expression list.
exp - the new expression string
Returns:
the new expression as a JotExpression.
Throws:
JotInvalidElementException

removeExpression

public void removeExpression(JotExpression exp)
                      throws JotInvalidElementException
Removes an existing expression.

Throws:
JotInvalidElementException

Extension SDK

 

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