Package org.data2semantics.platform.annotation

Examples of org.data2semantics.platform.annotation.Main


  {
    Class<?> curClass =  loadClass(instance.module().source());
   
    // Retrieve the main method and its annotation
    Method mainMethod = PlatformUtil.getMainMethod(curClass);
    Main mainAnnotation = PlatformUtil.getMainAnnotation(curClass);
   
    try {
      // This is where the module is actually executed
      Object result = mainMethod.invoke(moduleObject);
     
      // Store the result of the main method as the first output
      if(result != null) // if the main method is not null
        outputs.put(mainAnnotation.name(), result);
     
    } catch (Exception e)
    {
      throw new RuntimeException("Something went wrong during module execution.", e);
    }
View Full Code Here


            JavaType jType = new JavaType(m.getReturnType());
            return jType;
          }
        }
        if(a instanceof Main){
          Main mainAnnotation = (Main)a;
          if(mainAnnotation.name().equals(name)){
            JavaType jType = new JavaType(m.getReturnType());
            return jType;
          }
        }
      }
View Full Code Here

          if(outAnnotation.name().equals(name))       
            return outAnnotation.description();

        }
        if(a instanceof Main){
          Main mainAnnotation = (Main)a;
          if(mainAnnotation.name().equals(name))        
            return mainAnnotation.description();

        }
      }

    }
View Full Code Here

            return outAnnotation.print();

          }
        }
        if(a instanceof Main){
          Main mainAnnotation = (Main)a;
          if(mainAnnotation.name().equals(name)){
            return mainAnnotation.print();
          }
        }
      }

    }
View Full Code Here

TOP

Related Classes of org.data2semantics.platform.annotation.Main

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.