|
Extension SDK 10.1.2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The read-only JOT representation of Java method declarations. JotMethod instances represent class methods and interface abstract methods in JotClass instances.
A JotMethod
instance provides only a read-only view of a method.
Field Summary | |
static java.lang.String |
VOID_TYPE_NAME The void return type. |
Method Summary | |
void |
addExceptionType(int idx, java.lang.String typeName) Adds a new Exception type to this method at a specific location within the throws clause. |
void |
addExceptionType(java.lang.String typeName) Adds a new Exception type to this method. |
JotParameter |
addParameter(int idx, java.lang.String pType, java.lang.String pName) Adds a new parameter to this method. |
JotParameter |
addParameter(java.lang.String pType, java.lang.String pName) Adds a new parameter to this method. |
JotType[] |
getExceptionTypes() Retrieves the exception types declared in this method's throws-clause. |
JotParameter |
getFirstParameter() Retrieves this method's first parameter. |
JotMethod |
getOverriddenMethod() |
JotParameter |
getParameter(java.lang.String name) Deprecated. |
JotParameter[] |
getParameters() Retrieves this method's parameters. |
JotType[] |
getParameterTypes() Retrieves the types of this method's parameters. |
JotType |
getReturnType() Retrieves the type returned by this method. |
void |
removeExceptionType(java.lang.String typeName) Removes an exception type from the throws clause of this method. |
void |
removeParameter(JotParameter param) Removes an existing parameter from this method. |
void |
setReturnType(java.lang.String typeName) Sets the return type of this method. |
Methods inherited from interface oracle.jdeveloper.jot.JotMember |
getDeclaringClass, isDeprecated, isHidden |
Methods inherited from interface oracle.jdeveloper.jot.JotHasModifiers |
getModifiers, getModifierText, setModifiers, setModifierText |
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 |
Methods inherited from interface oracle.jdeveloper.jot.JotHasCodeBlock |
getCodeBlock, setCodeBlockText |
Methods inherited from interface oracle.jdeveloper.jot.JotNameable |
getName, setName |
Field Detail |
public static final java.lang.String VOID_TYPE_NAME
void
return type.
Method Detail |
public JotType getReturnType() throws JotInvalidElementException
JotInvalidElementException
public void setReturnType(java.lang.String typeName) throws JotInvalidElementException, JotException
typeName
- the new type name.JotInvalidElementException
JotException
public JotMethod getOverriddenMethod() throws JotInvalidElementException
JotInvalidElementException
public JotType[] getParameterTypes() throws JotInvalidElementException
JotInvalidElementException
public JotParameter[] getParameters() throws JotInvalidElementException
JotInvalidElementException
public JotParameter getFirstParameter() throws JotInvalidElementException
JotInvalidElementException
public JotParameter getParameter(java.lang.String name) throws JotInvalidElementException
name
- a parameter name.JotInvalidElementException
public JotParameter addParameter(java.lang.String pType, java.lang.String pName) throws JotInvalidElementException, JotException
pType
- the type of the new parameterpName
- the name of the new parameterJotInvalidElementException
JotException
public JotParameter addParameter(int idx, java.lang.String pType, java.lang.String pName) throws JotInvalidElementException, JotException
idx
- the location to insert the new parameter.pType
- the type of the new parameterpName
- the name of the new parameterJotInvalidElementException
JotException
public void removeParameter(JotParameter param) throws JotInvalidElementException, JotException
param
- the parameter to remove. If the parameter does not currently exist in this method, nothing is done.JotInvalidElementException
JotException
public JotType[] getExceptionTypes() throws JotInvalidElementException
JotInvalidElementException
public void addExceptionType(java.lang.String typeName) throws JotInvalidElementException, JotException
typeName
- the name of the exception type. The type name does not need to be fully qualified; however, the name should be resolveable in the current file context. For example, Exception
or java.io.IOException>/code>.
Throws:
JotInvalidElementException
JotException
public void addExceptionType(int idx, java.lang.String typeName) throws JotInvalidElementException, JotException
throws
clause.idx
- the location to insert the new exception type.typeName
- the name of the exception type. The type name does not need to be fully qualified; however, the name should be resolveable in the current file context. For example, Exception
or java.io.IOException>/code>.
Throws:
JotInvalidElementException
JotException
public void removeExceptionType(java.lang.String typeName) throws JotInvalidElementException, JotException
throws
clause of this method. If the type is not currently declared as being thrown, nothing happens.typeName
- the name of the exception type to remove.JotInvalidElementException
JotException
|
Extension SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.