| ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
A function in source code.
This interface provides a set of methods for accessing and changing this function's
data such as its body, parameters list, and return type.
Note that this interface is extended by the SciOperation interface,
inheriting all its methods.
| Method Summary | |
boolean | canSetBody(SciCodeBlock body)Checks whether it is possible to set the body of this function to the specified code block value. |
boolean | canSetReturnType(SciType type)Checks whether the return type for this function can be set to the specified value. |
SciCodeBlock | getBody()Returns code block with the body of this function. |
SciParameterList | getParameterList()Returns a container with the parameters of this function. |
SciType | getReturnType()Gets the return type for this function. |
SciThrowList | getThrowList()Returns a container of exceptions which can be thrown by this function. |
void | setBody(SciCodeBlock body)Sets the body of this function to the specified code block value. |
void | setReturnType(SciType type)Sets the return type for this function to the specified value. |
| Methods inherited from interface com.togethersoft.openapi.sci.SciElement |
accept, canSetName, canSetProperty, getDeclarationText, getName, getQualifiedName, getTagList, getUniqueName, hasProperty, isDeleted, isPropertyReadable, isPropertyWritable, setName, setProperty, visitReferences, visitReferences |
| Methods inherited from interface com.togethersoft.openapi.sci.SciObject |
canCut, canDelete, canReplace, copy, cut, delete, getContainingFile, getContainingScope, getLanguage, getPositions, getText, getUserProperty, isReadOnly, replace, setUserProperty |
| Method Detail |
public boolean canSetBody(SciCodeBlock body)
SciCodeBlock containing a body for this function. Usually, it is
true if the specified code block value can be set as a body for this functionpublic boolean canSetReturnType(SciType type)
SciType return typetrue if the specified return type for this function can be set to
false otherwisepublic SciCodeBlock getBody()
SciCodeBlock with the body of this functionpublic SciParameterList getParameterList()
SciParameterList which contains SciParameters for this functionpublic SciType getReturnType()
SciType object is used to get a string with the return type object.
someSciFunction
public lava.lang.Object getID(){ return null; }
String typeText = someSciFunction.getReturnType().getText();
typeText the "lava.lang.Object" value.
null in following cases:public SciThrowList getThrowList()
SciThrowList which contains SciThrowSpecifiers for this function.public void setBody(SciCodeBlock body)
SciCodeBlock containing a body for this function. Usually, it is
public void setReturnType(SciType type)
SciType
SciType object.
For example, to change the return type of this operation represented by someSciFunction
from
public void String getID(){ return null; }
to
public lava.lang.Object getID(){ return null; }
you should do the following:
someSciFunction.getReturnType().setText("lava.lang.Object");
SciType return type
| ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||