Extension SDK

oracle.jdeveloper.jot
Interface JotArrayAllocation

All Superinterfaces:
JotAllocation, 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"

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
 int getDimensions()
          Retrieves the dimensions of this array allocation expression.
 JotExpression getExpressionAt(int dimension)
          Retrieves a dimension expression.
 JotArrayInitializer getInitializationExpression()
          Retrieves the current array initialiation expression.
 JotExpression setExpressionAt(int dimension, java.lang.String exp)
          Sets a dimension expression.
 JotArrayInitializer setInitializationExpression(java.lang.String exp)
          Sets the array initialization expression.
 
Methods inherited from interface oracle.jdeveloper.jot.JotAllocation
getObjectType, setObjectType
 
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.JotElement
getElementName, getElementType, getEndOffset, getID, getJotWorkArea, getParent, getStartOffset, isExistent, isReadOnly, isStructureKnown, setParent
 

Method Detail

getDimensions

public int getDimensions()
Retrieves the dimensions of this array allocation expression.


getExpressionAt

public JotExpression getExpressionAt(int dimension)
Retrieves a dimension expression.

Parameters:
dimension - the dimension whose expression is required.
Returns:
the expression at the specifiec dimension index

setExpressionAt

public JotExpression setExpressionAt(int dimension,
                                     java.lang.String exp)
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

getInitializationExpression

public JotArrayInitializer getInitializationExpression()
Retrieves the current array initialiation expression.

Returns:
the current array initialization expression, or null if none is set.

setInitializationExpression

public JotArrayInitializer setInitializationExpression(java.lang.String exp)
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.

Extension SDK

 

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