functions.JEAFService.ext Maven / Gradle / Ivy
extension java::GeneratorCommons;
extension functions::Reactive;
extension functions::NamedElement;
cached boolean isJEAFService(uml::Element element):
element.isStereotypeApplied("JEAFService");
cached JMM::JEAFService asInterface(uml::Element element):
(JMM::JEAFService) element;
cached JMM::JEAFService asJEAFService(uml::Element element):
(JMM::JEAFService) element;
cached List[JMM::JEAFService] getParentServices(JMM::JEAFService interface) :
interface.parents().typeSelect(JMM::JEAFService);
cached String getServiceName(JMM::JEAFService service, boolean reactive):
if reactive
then service.name + "Reactive"
else service.name;
cached String getServiceNameFQN(JMM::JEAFService service, boolean reactive):
if reactive
then service.qualifiedName() + "Reactive"
else service.qualifiedName();
cached String getReactiveAwareTypeName(String typeName, boolean reactive):
if reactive == false
then typeName
else
if typeName == "void"
then getMonoTypeName() + ""
else
if typeName == "boolean"
then getMonoTypeName() + ""
else
if typeName == "byte"
then getMonoTypeName() + ""
else
if typeName == "short"
then getMonoTypeName() + ""
else
if typeName == "int"
then getMonoTypeName() + ""
else
if typeName == "long"
then getMonoTypeName() + ""
else
if typeName == "float"
then getMonoTypeName() + ""
else
if typeName == "double"
then getMonoTypeName() + ""
else getMonoTypeName() + "<" + typeName + ">";