org.objectweb.jac.ide
Class Method

java.lang.Object
  extended byorg.objectweb.jac.ide.ModelElement
      extended byorg.objectweb.jac.ide.TypedElement
          extended byorg.objectweb.jac.ide.Member
              extended byorg.objectweb.jac.ide.Method
All Implemented Interfaces:
Element, Typed, Visibility
Direct Known Subclasses:
AspectMethod, Constructor, FieldMethod

public class Method
extends Member


Field Summary
 
Fields inherited from interface org.objectweb.jac.ide.Visibility
PRIVATE, PROTECTED, PUBLIC
 
Constructor Summary
Method()
           
 
Method Summary
 void addException(String exception)
           
 void addParameter(Parameter p)
           
 void clearParameters()
           
 Method cloneMethod()
          Clone this method
 String getBody()
          Get the value of body.
 List getExceptions()
           
 String getModifiers()
          Returns a string of all the modifiers of a member item (field or method)
 String getParameterNames()
          Returns the names of all parameters, separated by a comma
 List getParameters()
          Get the value of parameters.
 String getParametersString()
          Returns the prototypes (type and name) of the parameters, separated by a comma
 Type[] getParameterTypes()
          Returns an array containing the types of the parameters
 String getPrototype()
           
 String getUniqueName()
          Returns the name with the type of the parameters between parenthesis.
 boolean isAbstract()
           
 boolean isSynchronized()
           
 void removeException(String exception)
           
 void removeParameter(Parameter p)
           
 void setAbstract(boolean value)
           
 void setBody(String v)
          Set the value of body.
 void setSynchronized(boolean value)
           
 
Methods inherited from class org.objectweb.jac.ide.Member
getFullName, getGenerationFullName, getGenerationName, getParent, getProject, getVisibility, isStatic, setParent, setStatic, setVisibility
 
Methods inherited from class org.objectweb.jac.ide.TypedElement
getToString, getType, getTypeName, isArray, setArray, setType
 
Methods inherited from class org.objectweb.jac.ide.ModelElement
addConfigItem, addEndingLink, addLink, getConfigItems, getDescription, getEndingLinks, getLinks, getName, remove, removeEndingLink, removeLink, setDescription, setEndingLinks, setLinks, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.objectweb.jac.ide.Element
getName
 

Constructor Detail

Method

public Method()
Method Detail

getPrototype

public String getPrototype()
Specified by:
getPrototype in class Member

getModifiers

public String getModifiers()
Description copied from class: Member
Returns a string of all the modifiers of a member item (field or method)

Overrides:
getModifiers in class Member
Returns:
a String with the modifiers, seperated by spaces
See Also:
Member.isStatic(), Member.getVisibility()

getParametersString

public String getParametersString()
Returns the prototypes (type and name) of the parameters, separated by a comma


getParameters

public List getParameters()
Get the value of parameters.

Returns:
value of parameters.

addParameter

public void addParameter(Parameter p)

removeParameter

public void removeParameter(Parameter p)

clearParameters

public void clearParameters()

getParameterTypes

public Type[] getParameterTypes()
Returns an array containing the types of the parameters


getBody

public String getBody()
Get the value of body.

Returns:
value of body.

setBody

public void setBody(String v)
Set the value of body.

Parameters:
v - Value to assign to body.

isAbstract

public boolean isAbstract()

setAbstract

public void setAbstract(boolean value)

isSynchronized

public boolean isSynchronized()

setSynchronized

public void setSynchronized(boolean value)

getUniqueName

public String getUniqueName()
Returns the name with the type of the parameters between parenthesis.


getParameterNames

public String getParameterNames()
Returns the names of all parameters, separated by a comma


getExceptions

public List getExceptions()

addException

public void addException(String exception)

removeException

public void removeException(String exception)

cloneMethod

public Method cloneMethod()
Clone this method

Returns:
a new method with the same name, return type and same parameters