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 StringbodyCodestatic ObjectModelJavaModifierDEFAULT_VISIBILITYprotected Set<String>exceptionsprotected List<ObjectModelParameter>parametersprotected ObjectModelParameterreturnParameterprotected StringtransactionLevel-
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 voidaddBodyCode(String bodyCode)Add some code to current bodyvoidaddExceptionParameter(ObjectModelParameterImpl raisedParameter)Add new raised exception.voidaddParameter(ObjectModelParameterImpl parameter)booleanequals(Object o)2 operations are equal if the have same name and same argument type.protected Set<ObjectModelModifier>getAuthorizedModifiers()StringgetBodyCode()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.ObjectModelParametergetReturnParameter()Return the return parameter of the operationStringgetReturnType()Returns the return type of this operation.StringgetVisibility()Returns the visibility of this operation.booleanisAbstract()Returns whether this operation is abstract or not.booleanisDefault()Returns whether this operation is default or not.booleanisFinal()Returns whether this operation is final or not.voidsetAbstract(boolean abstractz)voidsetBodyCode(String bodyCode)voidsetReturnParameter(ObjectModelParameterImpl returnParameter)voidsetVisibility(String visibility)StringtoString()-
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, mergeFrom, 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:
getAuthorizedModifiersin 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:ObjectModelOperationReturn the return parameter of the operation- Specified by:
getReturnParameterin interfaceObjectModelOperation- Returns:
- an ObjectModelParameter representing the return parameter
-
getReturnType
public String getReturnType()
Description copied from interface:ObjectModelOperationReturns the return type of this operation.- Specified by:
getReturnTypein interfaceObjectModelOperation- Returns:
- the return type of this operation.
-
getVisibility
public String getVisibility()
Description copied from interface:ObjectModelOperationReturns the visibility of this operation. Possible values includes public, protected and private.- Specified by:
getVisibilityin interfaceObjectModelOperation- Returns:
- the visibility of this operation.
-
isAbstract
public boolean isAbstract()
Returns whether this operation is abstract or not.- Specified by:
isAbstractin interfaceObjectModelOperation- Returns:
- a boolean indicating whether this operation is abstract or not.
-
isDefault
public boolean isDefault()
Description copied from interface:ObjectModelOperationReturns whether this operation is default or not. (See java 8).- Specified by:
isDefaultin interfaceObjectModelOperation- Returns:
- a boolean indicating whether this operation is default or not.
-
isFinal
public boolean isFinal()
Description copied from interface:ObjectModelOperationReturns whether this operation is final or not.- Specified by:
isFinalin interfaceObjectModelOperation- Returns:
- a boolean indicating whether this operation is final or not.
-
getParameters
public Collection<ObjectModelParameter> getParameters()
Description copied from interface:ObjectModelOperationReturns all parameters defined on this operation.- Specified by:
getParametersin 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:ObjectModelOperationReturns all exception qualified names thrown by this operation (as strings)- Specified by:
getExceptionsin interfaceObjectModelOperation- Returns:
- a Set containing the exceptions strings
-
getBodyCode
public String getBodyCode()
Description copied from interface:ObjectModelOperationReturn body of the operation (source code)- Specified by:
getBodyCodein interfaceObjectModelOperation- Returns:
- body of the operation (source code)
-
-