{
ExceptionUtils.checkNull("operation", operation);
OperationDeclaration operationDeclaration = null;
AOperation op = (AOperation)operation;
ATypeDeclaration typeDeclaration = (ATypeDeclaration)op.getReturnTypeDeclaration();
String returnType = null;
if (typeDeclaration != null)
{
returnType = ObjectUtils.toString(typeDeclaration.getType());
}
operationDeclaration = new OperationDeclarationImpl(ObjectUtils.toString(op.getName()), returnType, ConcreteSyntaxUtils.getVariableDeclarations(
operation));
return operationDeclaration;
}