Extension SDK 9.0.5

oracle.jdeveloper.jot
Interface JotAssignment

All Superinterfaces:
JotCodeElement, JotElement, JotExpression, JotStatementExpression

public interface JotAssignment
extends JotStatementExpression

A JotAssignment represents an assignment expression. An assignment consists of three parts: a left hand expression, an operator, and a right hand expression. The left hand expression must be a variable. The operator is one of =, +=, -=, *=, /=, %=, <<=, >>=, >>>=, &=, |=, or ^=. The right hand expression is any expression.

See Also:
"Section 15.26 of the Java Language Specification"

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 getAssignmentExpression()
          Retrieves the right hand expression.
 java.lang.String getAssignmentOperator()
          Retrieves the assignment operator.
 JotExpression getVariableExpression()
          Retrieves the left hand variable expression.
 java.lang.String getVariableName()
          Retrieves the left hand variable expression as a string.
 boolean isCompoundOperator()
          Whether this assignment is using a compound assignment operator.
 void setAssignmentExpression(java.lang.String exp)
          Sets the right hand expression.
 void setAssignmentOperator(java.lang.String oper)
          Sets the assignment operator.
 void setVariableName(java.lang.String newVar)
          Sets the left hand variable 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

getVariableExpression

public JotExpression getVariableExpression()
                                    throws JotInvalidElementException
Retrieves the left hand variable expression.

Returns:
the variable of this assignment.
Throws:
JotInvalidElementException

getVariableName

public java.lang.String getVariableName()
                                 throws JotInvalidElementException
Retrieves the left hand variable expression as a string.

Returns:
the variable of this assignment.
Throws:
JotInvalidElementException

setVariableName

public void setVariableName(java.lang.String newVar)
                     throws JotInvalidElementException
Sets the left hand variable expression.

Parameters:
newVar - the new variable expression.
Throws:
JotInvalidElementException

getAssignmentOperator

public java.lang.String getAssignmentOperator()
                                       throws JotInvalidElementException
Retrieves the assignment operator.

Returns:
the assignment operator.
Throws:
JotInvalidElementException

setAssignmentOperator

public void setAssignmentOperator(java.lang.String oper)
                           throws JotInvalidElementException
Sets the assignment operator.

Parameters:
oper - the new operator.
Throws:
JotInvalidElementException

isCompoundOperator

public boolean isCompoundOperator()
                           throws JotInvalidElementException
Whether this assignment is using a compound assignment operator.

Returns:
false if the assignment operator is =, true if the operator is any one of the eleven other operators.
Throws:
JotInvalidElementException

getAssignmentExpression

public JotExpression getAssignmentExpression()
                                      throws JotInvalidElementException
Retrieves the right hand expression.

Returns:
the JotExpression that makes up the right hand side of the assignment.
Throws:
JotInvalidElementException

setAssignmentExpression

public void setAssignmentExpression(java.lang.String exp)
                             throws JotInvalidElementException
Sets the right hand expression. The expression is set as a String.

Parameters:
exp - the new right hand expression as a String.
Throws:
JotInvalidElementException

Extension SDK

 

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