Extension SDK

oracle.jdeveloper.jot
Interface JotMethodCall

All Superinterfaces:
JotElement, JotExpression, JotStatementExpression

public interface JotMethodCall
extends JotStatementExpression

The JotMethodCall interface corresponds to method invocation expressions.

Method calls can be nested (for example, f().g()). In this case, the first method call (f()) is the primary method call. The second method call (g()) can be retrieved by calling the getNestedMethodCall method on the initial method call object.

Since:
5.0
See Also:
"Section 15.12 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 addArgument(JotExpression marker, boolean before, java.lang.String arg)
          Adds an arguement to the method invocation.
 JotExpression addArgument(java.lang.String arg)
          Adds an arguement to the end of this method invocation.
 JotExpression[] getArguments()
          Retrieves the arguments to the method invocation.
 java.lang.String getMethodName()
          Retrieves the name of the method being invoked.
 java.lang.String getObjectName()
          Retrieves the name of the object on which this method call is being invoked.
 void removeArgument(JotExpression argument)
          Removes an existing argument.
 void setMethodName(java.lang.String name)
          Sets the name of the method being invoked.
 void setObjectName(java.lang.String name)
          Sets the name of the object on which this methoc call is being invoked.
 
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

getObjectName

public java.lang.String getObjectName()
Retrieves the name of the object on which this method call is being invoked.

Returns:
the name of the object.

setObjectName

public void setObjectName(java.lang.String name)
Sets the name of the object on which this methoc call is being invoked.

Parameters:
name - the name of the object

getMethodName

public java.lang.String getMethodName()
Retrieves the name of the method being invoked.

Returns:
the method name.

setMethodName

public void setMethodName(java.lang.String name)
Sets the name of the method being invoked.


getArguments

public JotExpression[] getArguments()
Retrieves the arguments to the method invocation.

Returns:
an array of expressions representing the method arguments.

addArgument

public JotExpression addArgument(JotExpression marker,
                                 boolean before,
                                 java.lang.String arg)
Adds an arguement to the method invocation.

Parameters:
marker - an existing argument to position relative to, or null if the argument should be positioned at the beginning or end of this block.
before - whether to position the new argument before or after the existing marker argument; or if marker is null, whether to position the new argument at the beginning or the end of this block.
arg - the new argument to add.
Returns:
a JotExpression representing the new argument.

addArgument

public JotExpression addArgument(java.lang.String arg)
Adds an arguement to the end of this method invocation.

Parameters:
arg - the new argument to add.
Returns:
a JotExpression representing the new argument.

removeArgument

public void removeArgument(JotExpression argument)
Removes an existing argument.

Parameters:
argument - the argument to remove.

Extension SDK

 

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