Class ObjectModelOperationImpl
- java.lang.Object
-
- org.nuiton.eugene.models.object.xml.ObjectModelElementImpl
-
- org.nuiton.eugene.models.object.xml.ObjectModelOperationImpl
-
- All Implemented Interfaces:
WithTagValuesOrStereotypes
,ObjectModelElement
,ObjectModelOperation
public class ObjectModelOperationImpl extends ObjectModelElementImpl implements ObjectModelOperation
ObjectModelOperationImpl.java Created: 14 janv. 2004- Author:
- Cédric Pineau - pineau@codelutin.com Copyright Code Lutin
-
-
Field Summary
Fields Modifier and Type Field Description protected String
bodyCode
static ObjectModelJavaModifier
DEFAULT_VISIBILITY
protected Set<String>
exceptions
protected List<ObjectModelParameter>
parameters
protected ObjectModelParameter
returnParameter
protected String
transactionLevel
-
Fields inherited from class org.nuiton.eugene.models.object.xml.ObjectModelElementImpl
comments, declaringElement, documentation, modifiers, name, objectModelImpl, tagValues
-
-
Constructor Summary
Constructors Constructor Description ObjectModelOperationImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addBodyCode(String bodyCode)
Add some code to current bodyvoid
addExceptionParameter(ObjectModelParameterImpl raisedParameter)
Add new raised exception.void
addParameter(ObjectModelParameterImpl parameter)
boolean
equals(Object o)
2 operations are equal if the have same name and same argument type.protected Set<ObjectModelModifier>
getAuthorizedModifiers()
String
getBodyCode()
Return body of the operation (source code)Set<String>
getExceptions()
Returns all exception qualified names thrown by this operation (as strings)Collection<ObjectModelParameter>
getParameters()
Returns all parameters defined on this operation.ObjectModelParameter
getReturnParameter()
Return the return parameter of the operationString
getReturnType()
Returns the return type of this operation.String
getVisibility()
Returns the visibility of this operation.boolean
isAbstract()
Returns whether this operation is abstract or not.void
setAbstract(boolean abstractz)
void
setBodyCode(String bodyCode)
void
setReturnParameter(ObjectModelParameterImpl returnParameter)
void
setVisibility(String visibility)
String
toString()
-
Methods inherited from class org.nuiton.eugene.models.object.xml.ObjectModelElementImpl
addComment, addModifier, addOrRemoveModifier, addStereotype, addStereotype, addTagValue, addTagValue, getComments, getDeclaringElement, getDescription, getDocumentation, getModel, getName, getSourceDocumentation, getStereotypes, getTagValue, getTagValues, hasStereotype, hasTagValue, isStatic, postInit, removeModifier, removeModifiers, removeStereotype, removeTagValue, setDeclaringElement, setDocumentation, setName, setObjectModelImpl, setStatic
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.nuiton.eugene.models.object.ObjectModelElement
getComments, getDeclaringElement, getDescription, getDocumentation, getName, getSourceDocumentation, isStatic
-
Methods inherited from interface org.nuiton.eugene.models.extension.tagvalue.WithTagValuesOrStereotypes
addStereotype, addTagValue, getStereotypes, getTagValue, getTagValues, hasStereotype, hasTagValue, removeStereotype, removeTagValue
-
-
-
-
Field Detail
-
DEFAULT_VISIBILITY
public static final ObjectModelJavaModifier DEFAULT_VISIBILITY
-
returnParameter
protected ObjectModelParameter returnParameter
-
transactionLevel
protected String transactionLevel
-
parameters
protected List<ObjectModelParameter> parameters
-
bodyCode
protected String bodyCode
-
-
Method Detail
-
getAuthorizedModifiers
protected Set<ObjectModelModifier> getAuthorizedModifiers()
- Specified by:
getAuthorizedModifiers
in classObjectModelElementImpl
-
equals
public boolean equals(Object o)
2 operations are equal if the have same name and same argument type.
-
addParameter
public void addParameter(ObjectModelParameterImpl parameter)
-
setVisibility
public void setVisibility(String visibility)
-
setAbstract
public void setAbstract(boolean abstractz)
-
setReturnParameter
public void setReturnParameter(ObjectModelParameterImpl returnParameter)
-
setBodyCode
public void setBodyCode(String bodyCode)
-
addBodyCode
public void addBodyCode(String bodyCode)
Add some code to current body- Parameters:
bodyCode
- code to add
-
getReturnParameter
public ObjectModelParameter getReturnParameter()
Description copied from interface:ObjectModelOperation
Return the return parameter of the operation- Specified by:
getReturnParameter
in interfaceObjectModelOperation
- Returns:
- an ObjectModelParameter representing the return parameter
-
getReturnType
public String getReturnType()
Description copied from interface:ObjectModelOperation
Returns the return type of this operation.- Specified by:
getReturnType
in interfaceObjectModelOperation
- Returns:
- the return type of this operation.
-
getVisibility
public String getVisibility()
Description copied from interface:ObjectModelOperation
Returns the visibility of this operation. Possible values includespublic
,protected
andprivate
.- Specified by:
getVisibility
in interfaceObjectModelOperation
- Returns:
- the visibility of this operation.
-
isAbstract
public boolean isAbstract()
Returns whether this operation is abstract or not.- Specified by:
isAbstract
in interfaceObjectModelOperation
- Returns:
- a boolean indicating whether this operation is abstract or not.
-
getParameters
public Collection<ObjectModelParameter> getParameters()
Description copied from interface:ObjectModelOperation
Returns all parameters defined on this operation.- Specified by:
getParameters
in interfaceObjectModelOperation
- Returns:
- a Collection containing all parameters defined on this operation.
- See Also:
ObjectModelParameter
-
addExceptionParameter
public void addExceptionParameter(ObjectModelParameterImpl raisedParameter)
Add new raised exception.- Parameters:
raisedParameter
- exception to add
-
getExceptions
public Set<String> getExceptions()
Description copied from interface:ObjectModelOperation
Returns all exception qualified names thrown by this operation (as strings)- Specified by:
getExceptions
in interfaceObjectModelOperation
- Returns:
- a Set containing the exceptions strings
-
getBodyCode
public String getBodyCode()
Description copied from interface:ObjectModelOperation
Return body of the operation (source code)- Specified by:
getBodyCode
in interfaceObjectModelOperation
- Returns:
- body of the operation (source code)
-
-