Package cruise.umple.compiler
Class Method
java.lang.Object
cruise.umple.compiler.Method
public class Method
extends java.lang.Object
A method in an Umple class or interface
Umple Methods are coded by the programmer in the language(s) of their choice
This is for cloning
Note: This code doesn't cover deep cloning. It's a combination of shallow and deep cloning
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Method.Source
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description boolean
addComment(Comment aComment)
boolean
addCommentAt(Comment aComment, int index)
boolean
addException(java.lang.String aException)
boolean
addMethodParameter(MethodParameter aMethodParameter)
boolean
addMethodParameterAt(MethodParameter aMethodParameter, int index)
boolean
addOrMoveCommentAt(Comment aComment, int index)
boolean
addOrMoveMethodParameterAt(MethodParameter aMethodParameter, int index)
boolean
addOrMoveRequirementAt(Requirement aRequirement, int index)
boolean
addRequirement(Requirement aRequirement)
boolean
addRequirementAt(Requirement aRequirement, int index)
boolean
compareWithTheMethod(Method inMethod)
---------------------------------end---------------------------------------- ---------------------------------------------------------------------------- ---------------------------------Start--------------------------------------void
delete()
boolean
equals(java.lang.Object o)
Position
getCodePosition()
Comment
getComment(int index)
java.util.List<Comment>
getComments()
The comments associated with the method (such as the Javadoc above it).Position
getEndPosition()
java.lang.String
getException(int index)
java.lang.String[]
getExceptions()
boolean
getExistsInLanguage(java.lang.String lang)
boolean
getIsAbstract()
Specifies whether or not the Method is abstract.boolean
getIsConstructor()
Specifies whether this is a constructor for the Umple class.boolean
getIsImplemented()
Specifies whether or not the method is implemented.boolean
getIsQueued()
Specifies whether or not the method is queued.MethodBody
getMethodBody()
MethodParameter
getMethodParameter(int index)
java.util.List<MethodParameter>
getMethodParameters()
The method parameters.java.lang.String
getModifier()
The modifier associated with the method.java.lang.String
getName()
The name of the method.Position
getPosition()
Requirement
getRequirement(int index)
java.util.List<Requirement>
getRequirements()
The requirement ids implemented within the method.java.lang.String
getSignature()
---------------------------------end---------------------------------------- ---------------------------------------------------------------------------- ---------------------------------Start--------------------------------------Method.Source
getSource()
java.lang.String
getSourceFullName()
java.util.List<TraceItem>
getTraced(java.lang.String method, UmpleClass uClass)
java.lang.String
getType()
The type of the method.UmpleClass
getUmpleClass()
boolean
getWasGenerated()
Specifies, for fAutoAPI methods, if the method was generatedboolean
hasComments()
boolean
hasExceptions()
int
hashCode()
boolean
hasMethodBody()
boolean
hasMethodParameters()
boolean
hasRequirements()
boolean
hasUmpleClass()
int
indexOfComment(Comment aComment)
int
indexOfException(java.lang.String aException)
int
indexOfMethodParameter(MethodParameter aMethodParameter)
int
indexOfRequirement(Requirement aRequirement)
boolean
isIsAbstract()
boolean
isIsConstructor()
boolean
isIsImplemented()
boolean
isIsQueued()
boolean
isWasGenerated()
static int
minimumNumberOfComments()
static int
minimumNumberOfMethodParameters()
static int
minimumNumberOfRequirements()
int
numberOfComments()
int
numberOfExceptions()
int
numberOfMethodParameters()
int
numberOfRequirements()
boolean
removeComment(Comment aComment)
boolean
removeException(java.lang.String aException)
boolean
removeMethodParameter(MethodParameter aMethodParameter)
boolean
removeRequirement(Requirement aRequirement)
boolean
setCodePosition(Position aCodePosition)
boolean
setEndPosition(Position aEndPosition)
boolean
setIsAbstract(boolean aIsAbstract)
boolean
setIsConstructor(boolean aIsConstructor)
boolean
setIsImplemented(boolean aIsImplemented)
boolean
setIsQueued(boolean aIsQueued)
boolean
setMethodBody(MethodBody aNewMethodBody)
void
setMethodParameters(java.util.List<MethodParameter> parameters)
---------------------------------------------------------------------------- ---------------------------------Start-------------------------------------- ----------------------------------------------------------------------------boolean
setModifier(java.lang.String aModifier)
boolean
setName(java.lang.String aName)
boolean
setPosition(Position aPosition)
boolean
setSource(Method.Source aSource)
boolean
setType(java.lang.String aType)
boolean
setUmpleClass(UmpleClass aUmpleClass)
boolean
setWasGenerated(boolean aWasGenerated)
java.lang.String
toString()
-
Constructor Details
-
Method Details
-
setIsAbstract
public boolean setIsAbstract(boolean aIsAbstract) -
setIsConstructor
public boolean setIsConstructor(boolean aIsConstructor) -
setIsQueued
public boolean setIsQueued(boolean aIsQueued) -
setModifier
public boolean setModifier(java.lang.String aModifier) -
setName
public boolean setName(java.lang.String aName) -
addException
public boolean addException(java.lang.String aException) -
removeException
public boolean removeException(java.lang.String aException) -
setPosition
-
setCodePosition
-
setEndPosition
-
setType
public boolean setType(java.lang.String aType) -
setIsImplemented
public boolean setIsImplemented(boolean aIsImplemented) -
setWasGenerated
public boolean setWasGenerated(boolean aWasGenerated) -
getIsAbstract
public boolean getIsAbstract()Specifies whether or not the Method is abstract. -
getIsConstructor
public boolean getIsConstructor()Specifies whether this is a constructor for the Umple class. -
getIsQueued
public boolean getIsQueued()Specifies whether or not the method is queued. -
getModifier
public java.lang.String getModifier()The modifier associated with the method. -
getName
public java.lang.String getName()The name of the method. -
getException
public java.lang.String getException(int index) -
getExceptions
public java.lang.String[] getExceptions() -
numberOfExceptions
public int numberOfExceptions() -
hasExceptions
public boolean hasExceptions() -
indexOfException
public int indexOfException(java.lang.String aException) -
getPosition
-
getCodePosition
-
getEndPosition
-
getType
public java.lang.String getType()The type of the method. -
getIsImplemented
public boolean getIsImplemented()Specifies whether or not the method is implemented. -
getWasGenerated
public boolean getWasGenerated()Specifies, for fAutoAPI methods, if the method was generated -
isIsAbstract
public boolean isIsAbstract() -
isIsConstructor
public boolean isIsConstructor() -
isIsQueued
public boolean isIsQueued() -
isIsImplemented
public boolean isIsImplemented() -
isWasGenerated
public boolean isWasGenerated() -
getSourceFullName
public java.lang.String getSourceFullName() -
getSource
-
setSource
-
getMethodParameter
-
getMethodParameters
The method parameters. -
numberOfMethodParameters
public int numberOfMethodParameters() -
hasMethodParameters
public boolean hasMethodParameters() -
indexOfMethodParameter
-
getMethodBody
-
hasMethodBody
public boolean hasMethodBody() -
getComment
-
getComments
The comments associated with the method (such as the Javadoc above it). -
numberOfComments
public int numberOfComments() -
hasComments
public boolean hasComments() -
indexOfComment
-
getRequirement
-
getRequirements
The requirement ids implemented within the method. -
numberOfRequirements
public int numberOfRequirements() -
hasRequirements
public boolean hasRequirements() -
indexOfRequirement
-
getUmpleClass
-
hasUmpleClass
public boolean hasUmpleClass() -
minimumNumberOfMethodParameters
public static int minimumNumberOfMethodParameters() -
addMethodParameter
-
removeMethodParameter
-
addMethodParameterAt
-
addOrMoveMethodParameterAt
-
setMethodBody
-
minimumNumberOfComments
public static int minimumNumberOfComments() -
addComment
-
removeComment
-
addCommentAt
-
addOrMoveCommentAt
-
minimumNumberOfRequirements
public static int minimumNumberOfRequirements() -
addRequirement
-
removeRequirement
-
addRequirementAt
-
addOrMoveRequirementAt
-
setUmpleClass
-
delete
public void delete() -
setMethodParameters
---------------------------------------------------------------------------- ---------------------------------Start-------------------------------------- ---------------------------------------------------------------------------- -
getSignature
public java.lang.String getSignature()---------------------------------end---------------------------------------- ---------------------------------------------------------------------------- ---------------------------------Start-------------------------------------- -
compareWithTheMethod
---------------------------------end---------------------------------------- ---------------------------------------------------------------------------- ---------------------------------Start-------------------------------------- -
getExistsInLanguage
public boolean getExistsInLanguage(java.lang.String lang) -
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCode
in classjava.lang.Object
-
getTraced
-