oracle.jdeveloper.jot
Interface JotArrayAllocation
- All Superinterfaces:
- JotAllocation, JotCodeElement, JotElement, JotExpression, JotStatementExpression
- public interface JotArrayAllocation
- extends JotAllocation
The JotArrayAllocation
represents an array allocation expression. Array allocation expressions are used to create new array instances and have one of the following forms:
new String[3]
new int[5][]
new String[] { "Foo", "Bar" }
- Since:
- 5.0
- See Also:
- "Section 15.10 of the Java Language Specification Second Edition"
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 |
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 |
getDimensions
public int getDimensions()
throws JotInvalidElementException
- Retrieves the dimensions of this array allocation expression.
-
- Throws:
JotInvalidElementException
getExpressionAt
public JotExpression getExpressionAt(int dimension)
throws JotInvalidElementException
- Retrieves a dimension expression.
-
- Parameters:
dimension
- the dimension whose expression is required.
- Returns:
- the expression at the specifiec dimension index
- Throws:
JotInvalidElementException
setExpressionAt
public JotExpression setExpressionAt(int dimension,
java.lang.String exp)
throws JotInvalidElementException
- Sets a dimension expression. Any existing expression at that index is removed.
-
- Parameters:
dimension
- the specifiec dimension index
exp
- the new expression.
- Returns:
- the new expression as a
JotExpression
- Throws:
JotInvalidElementException
getInitializationExpression
public JotArrayInitializer getInitializationExpression()
throws JotInvalidElementException
- Retrieves the current array initialiation expression.
-
- Returns:
- the current array initialization expression, or
null
if none is set.
- Throws:
JotInvalidElementException
setInitializationExpression
public JotArrayInitializer setInitializationExpression(java.lang.String exp)
throws JotInvalidElementException
- Sets the array initialization expression. Any existing expression is removed.
-
- Parameters:
exp
- the new expression, or null
to remove the expression.
- Returns:
- the new expression as a
JotArrayInitializer
.
- Throws:
JotInvalidElementException
Copyright © 1997, 2004, Oracle. All rights reserved.