All Downloads are FREE. Search and download functionalities are using the official Maven repository.

functions.JEAFService.ext Maven / Gradle / Ivy

There is a newer version: 1.24.1
Show newest version
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 + ">";




© 2015 - 2024 Weber Informatics LLC | Privacy Policy