|
Extension SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A JotExpression
represents a Java expression. An expression
can fall into at most one of fourteen expression types. Calling
getExpressionType
will return the type of the expression.
Additionally, the methods getAsXXX
will return the expression
as the type XXX
if the expression is of that type, or
null
otherwise. Only one of the getAsXXX
methods
will return a non-null value for any given expression.
Field Summary | |
static int |
ANONYMOUS_CLASS_ALLOCATION_EXPRESSION
ID value representing an allocation of a new anonymous class instance. |
static int |
ARRAY_ALLOCATION_EXPRESSION
ID value representing an allocation of a new array. |
static int |
ARRAY_DEREFERENCE_EXPRESSION
ID value representing an array initializer expression. |
static int |
ARRAY_INITIALIZER_EXPRESSION
ID value representing an array initializer expression. |
static int |
ASSIGNMENT_EXPRESSION
ID value representing an assignment. |
static int |
CLASS_ALLOCATION_EXPRESSION
ID value representing an allocation of a new class instance. |
static int |
INFIX_EXPRESSION
ID value representing an infix expression. |
static int |
METHOD_CALL_EXPRESSION
ID value representing method call. |
static int |
NESTED_EXPRESSION
ID value representing a nested expression. |
static int |
POST_INC_OR_DEC_EXPRESSION
ID value representing a post increment or decrement. |
static int |
PRE_INC_OR_DEC_EXPRESSION
ID value representing a pre increment or decrement. |
static int |
PRIMARY_EXPRESSION
ID value representing a primary expression. |
static int |
QUESTION_EXPRESSION
ID value representing a question expression. |
static int |
TYPECAST_EXPRESSION
ID value representing a typecast. |
static int |
UNARY_EXPRESSION
ID value representing a unary expression. |
static int |
UNCATEGORIZED_EXPRESSION
ID value representing an arbitrary expression. |
Method Summary | |
JotAnonymousClass |
getAsAnonymousClass()
Retrieves the JotAnonymousClass representing this
expression if it is an anonymous class declaration. |
JotArrayAllocation |
getAsArrayAllocation()
Retrieves the JotArrayAllocation representing this
expression if it is an array allocation. |
JotArrayDereference |
getAsArrayDereference()
Retrieves the JotArrayDereference representing this
expression if it is an array dereference expression. |
JotArrayInitializer |
getAsArrayInitializer()
Retrieves the JotArrayInitializer representing this
expression if it is an array initializer expression. |
JotAssignment |
getAsAssignment()
Retrieves the JotAssignment representing this
expression if it is an assignment. |
JotClassAllocation |
getAsClassAllocation()
Retrieves the JotClassAllocation representing this
expression if it is a class allocation. |
JotInfixExpression |
getAsInfixExpression()
Retrieves the JotInfixExpression representing this
expression if it is an infix expression. |
JotMethodCall |
getAsMethodCall()
Retrieves the JotMethodCall representing this
expression if it is a method call. |
JotNestedExpression |
getAsNestedExpression()
Retrieves the JotNestedExpression representing this
expression if it is a nested expression. |
JotPostIncrementOrDecrement |
getAsPostIncrementOrDecrement()
Retrieves the JotPostIncrementOrDecrement representing this
expression if it is a post increment or decrement expression. |
JotPreIncrementOrDecrement |
getAsPreIncrementOrDecrement()
Retrieves the JotPreIncrementOrDecrement representing this
expression if it is a pre increment or decrement expression. |
JotPrimaryExpression |
getAsPrimaryExpression()
Retrieves the JotPrimaryExpression representing this
expression if it is a primary expression. |
JotQuestionExpression |
getAsQuestionExpression()
Retrieves the JotQuestionExpression representing this
expression if it is a question expression. |
JotTypecast |
getAsTypecast()
Retrieves the JotTypecast representing this
expression if it is a typecast. |
JotUnaryExpression |
getAsUnaryExpression()
Retrieves the JotUnaryExpression representing this
expression if it is a unary expression. |
java.lang.String |
getExpressionString()
Retrieves the string representation of this expression. |
int |
getExpressionType()
Retrieves the kind of expression represented by this JotExpression . |
java.lang.String |
getMinimumReferenceName(java.lang.String type)
Retrieves the minimum name required to reference the specified type, based on the current scope. |
boolean |
isParenthesized()
Whether this expression is enclosed within parenthesis. |
void |
renameObjectReference(java.lang.String oldName,
java.lang.String newName)
Renames any occurrences of a given object name to another name. |
JotType |
resolveTypeReference(java.lang.String type)
Resolves a type name into a JotType , based on the
current scope. |
void |
setParenthesized(boolean isParenthesized)
Sets the parenthesis state of this expression. |
Methods inherited from interface oracle.jdeveloper.jot.JotElement |
getElementName, getElementType, getEndOffset, getID, getJotWorkArea, getParent, getStartOffset, isExistent, isReadOnly, isStructureKnown, setParent |
Field Detail |
public static final int UNCATEGORIZED_EXPRESSION
public static final int METHOD_CALL_EXPRESSION
public static final int ASSIGNMENT_EXPRESSION
public static final int CLASS_ALLOCATION_EXPRESSION
public static final int ARRAY_ALLOCATION_EXPRESSION
public static final int ANONYMOUS_CLASS_ALLOCATION_EXPRESSION
public static final int NESTED_EXPRESSION
public static final int ARRAY_INITIALIZER_EXPRESSION
public static final int UNARY_EXPRESSION
public static final int TYPECAST_EXPRESSION
public static final int PRE_INC_OR_DEC_EXPRESSION
public static final int POST_INC_OR_DEC_EXPRESSION
public static final int INFIX_EXPRESSION
public static final int QUESTION_EXPRESSION
public static final int PRIMARY_EXPRESSION
public static final int ARRAY_DEREFERENCE_EXPRESSION
Method Detail |
public int getExpressionType()
JotExpression
.
public java.lang.String getExpressionString()
public JotMethodCall getAsMethodCall()
JotMethodCall
representing this
expression if it is a method call.
JotMethodCall
instance if this expression
is a method call, or null
otherwise.public JotAssignment getAsAssignment()
JotAssignment
representing this
expression if it is an assignment.
JotAssignment
instance if this expression
is an assignment, or null
otherwise.public JotClassAllocation getAsClassAllocation()
JotClassAllocation
representing this
expression if it is a class allocation.
JotClassAllocation
instance if this expression
is a class allocation, or null
otherwise.public JotArrayAllocation getAsArrayAllocation()
JotArrayAllocation
representing this
expression if it is an array allocation.
JotArrayAllocation
instance if this expression
is an array allocation, or null
otherwise.public JotAnonymousClass getAsAnonymousClass()
JotAnonymousClass
representing this
expression if it is an anonymous class declaration.
JotAnonymousClass
instance if this expression
is an anonymous class declaration, or null
otherwise.public JotNestedExpression getAsNestedExpression()
JotNestedExpression
representing this
expression if it is a nested expression.
JotNestedExpression
instance if this expression
is a nested expression, or null
otherwise.public JotArrayInitializer getAsArrayInitializer()
JotArrayInitializer
representing this
expression if it is an array initializer expression.
JotArrayInitializer
instance if this expression
is an array initializer expression, or null
otherwise.public JotArrayDereference getAsArrayDereference()
JotArrayDereference
representing this
expression if it is an array dereference expression.
JotArrayDereference
instance if this expression
is an array dereference expression, or null
otherwise.public JotUnaryExpression getAsUnaryExpression()
JotUnaryExpression
representing this
expression if it is a unary expression.
JotUnaryExpression
instance if this expression
is a unary expression, or null
otherwise.public JotTypecast getAsTypecast()
JotTypecast
representing this
expression if it is a typecast.
JotTypecast
instance if this expression
is a typecast, or null
otherwise.public JotPreIncrementOrDecrement getAsPreIncrementOrDecrement()
JotPreIncrementOrDecrement
representing this
expression if it is a pre increment or decrement expression.
JotPreIncrementOrDecrement
instance if this expression
is a pre increment or decrement expression, or null
otherwise.public JotPostIncrementOrDecrement getAsPostIncrementOrDecrement()
JotPostIncrementOrDecrement
representing this
expression if it is a post increment or decrement expression.
JotPostIncrementOrDecrement
instance if this expression
is a nested expression, or null
otherwise.public JotInfixExpression getAsInfixExpression()
JotInfixExpression
representing this
expression if it is an infix expression.
JotInfixExpression
instance if this expression
is an infix expression, or null
otherwise.public JotQuestionExpression getAsQuestionExpression()
JotQuestionExpression
representing this
expression if it is a question expression.
JotQuestionExpression
instance if this expression
is a question expression, or null
otherwise.public JotPrimaryExpression getAsPrimaryExpression()
JotPrimaryExpression
representing this
expression if it is a primary expression.
JotPrimaryExpression
instance if this expression
is a primary expression, or null
otherwise.public boolean isParenthesized()
true
if this expression is wrapped in
a set of parenthesis.public void setParenthesized(boolean isParenthesized)
isParenthesized
- true
if this expression should
be wrapped in a set of parenthesis.public void renameObjectReference(java.lang.String oldName, java.lang.String newName)
oldName
- the old name.newName
- the new name.public JotType resolveTypeReference(java.lang.String type)
JotType
, based on the
current scope.
type
- the type name (for example, String
).
JotType
representing the type.public java.lang.String getMinimumReferenceName(java.lang.String type)
java.lang.String
can usually be refered to as String
.
type
- the qualified typename
|
Extension SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright ©1997, 2003, Oracle. All rights reserved.