|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.objectwave.sourceModel.CommonDef | +--com.objectwave.sourceModel.MethodDef
MetaModel representation of a MethodDefinition. This class is largely a holder of data about a method definition. The MethodDefParser is responsible for creating instances of this object. There is very little behavior in this class.
CommonDef
,
MethodDefParser
Nested Class Summary | |
static class |
MethodDef.Test
Unit test for this class. |
Field Summary |
Fields inherited from class com.objectwave.sourceModel.CommonDef |
collectionTypes |
Constructor Summary | |
MethodDef()
|
Method Summary | |
void |
addException(java.lang.String except)
Add the String identified by the parameter as an exception thrown by this method. |
void |
changeComment(java.lang.String newValue)
Side effect of changing the 'fullText' attribute for this object. |
MethodDef |
cloneSignature()
Create a copy of this method with a empty body implementation. |
MethodDef |
cloneSignature(java.lang.String newBody)
Useful for copying the signature Since all interface methods are abstract, and that is a common method def we would like to clone, the abstract portion of the signature is dropped. |
void |
dumpObject()
|
boolean |
equals(java.lang.Object element)
A MethodDef is equal if it has the exact same signature. |
java.lang.String[] |
getArgumentTypes()
Just string values of the argument types. |
java.lang.String |
getComment()
|
java.util.Vector |
getExceptions()
|
java.lang.String |
getMethodText()
This is the information within the { }. |
MethodParameter[] |
getParameters()
A method will likely have parameters. |
boolean |
isAbstractMeth()
Gets the AbstractMeth attribute of the MethodDef object |
boolean |
isConstructor()
Gets the Constructor attribute of the MethodDef object |
boolean |
isNativeMeth()
Gets the NativeMeth attribute of the MethodDef object |
java.lang.String |
listEntry()
Description of the Method |
void |
setAbstractMeth(boolean aValue)
Sets the AbstractMeth attribute of the MethodDef object |
void |
setArgumentTypes(java.lang.String[] strArr)
Just string values of the argument types. |
void |
setComment(java.lang.String newValue)
|
void |
setConstructor(boolean b)
Sets the Constructor attribute of the MethodDef object |
void |
setExceptions(java.util.Vector v)
Vector containing the exceptions declared for this method. |
void |
setMethodText(java.lang.String aValue)
This is the information within the { }. |
void |
setName(java.lang.String aName)
The identifier for this method. |
void |
setNativeMeth(boolean aValue)
Is this method a native method? |
void |
setParameters(MethodParameter[] paramArr)
A method will likely have parameters. |
java.lang.String |
shortString()
|
Methods inherited from class com.objectwave.sourceModel.CommonDef |
getChildElements, getFullText, getFullTextNoChild, getName, getScope, getType, hasChildElements, isCollection, isFinal, isNativeArray, isStatic, setFinal, setFullText, setNativeArray, setScope, setStatic, setType |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MethodDef()
Method Detail |
public void setExceptions(java.util.Vector v)
v
- The new Exceptions valuepublic void setAbstractMeth(boolean aValue)
aValue
- The new AbstractMeth valuepublic void setArgumentTypes(java.lang.String[] strArr)
strArr
- The new ArgumentTypes valuepublic void setComment(java.lang.String newValue)
newValue
- java.lang.Stringpublic void setConstructor(boolean b)
b
- The new Constructor valuepublic void setMethodText(java.lang.String aValue)
aValue
- The new MethodText valuepublic void setName(java.lang.String aName)
setName
in class CommonDef
aName
- The new Name valuepublic void setNativeMeth(boolean aValue)
aValue
- The new NativeMeth valuepublic void setParameters(MethodParameter[] paramArr)
paramArr
- The new Parameters valueMethodParameter
public java.util.Vector getExceptions()
public java.lang.String[] getArgumentTypes()
public java.lang.String getComment()
public java.lang.String getMethodText()
public MethodParameter[] getParameters()
MethodParameter
public boolean isAbstractMeth()
public boolean isConstructor()
public boolean isNativeMeth()
public void addException(java.lang.String except)
except
- The feature to be added to the Exception attributepublic MethodDef cloneSignature()
public MethodDef cloneSignature(java.lang.String newBody)
newBody
- The body of the method.
public void changeComment(java.lang.String newValue)
newValue
- java.lang.Stringpublic void dumpObject()
dumpObject
in interface ClassElement
dumpObject
in class CommonDef
public boolean equals(java.lang.Object element)
equals
in class CommonDef
element
- The object with which to compare this.
public java.lang.String listEntry()
public java.lang.String shortString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |