|
Extension SDK | |||||||||
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. |
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, isSource |
Methods inherited from interface oracle.jdeveloper.jot.JotHasModifiers |
getModifiers, setModifiers |
Methods inherited from interface oracle.jdeveloper.jot.JotElement |
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()
public void setReturnType(java.lang.String typeName) throws JotException
typeName
- the new type name.
JotException
public JotType[] getParameterTypes()
public JotParameter[] getParameters()
public JotParameter getFirstParameter()
public JotParameter getParameter(java.lang.String name)
name
- a parameter name.
public JotParameter addParameter(java.lang.String pType, java.lang.String pName) throws JotException
pType
- the type of the new parameterpName
- the name of the new parameter
JotException
public JotParameter addParameter(int idx, java.lang.String pType, java.lang.String pName) throws JotException
idx
- the location to insert the new parameter.pType
- the type of the new parameterpName
- the name of the new parameter
JotException
public void removeParameter(JotParameter param) throws JotException
param
- the parameter to remove. If the parameter does not
currently exist in this method, nothing is done.
JotException
public JotType[] getExceptionTypes()
public void addExceptionType(java.lang.String typeName) throws 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:
JotException
public void addExceptionType(int idx, java.lang.String typeName) throws 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:
JotException
public void removeExceptionType(java.lang.String typeName) throws 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.
JotException
|
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.