Package com.dragome.commons

Examples of com.dragome.commons.DragomeConfigurator


    }
  }

  private static DragomeConfigurator getConfigurator()
  {
    DragomeConfigurator configurator= new DefaultDragomeConfigurator();
    List<AnnotationEntry> annotationEntries= AnnotationsHelper.getAnnotationsByType(DragomeConfiguratorImplementor.class).getEntries();
    for (AnnotationEntry annotationEntry : annotationEntries)
    {
      if (!annotationEntry.getType().equals(DefaultDragomeConfigurator.class))
        configurator= ServiceLocator.getInstance().getReflectionService().createClassInstance((Class<? extends DragomeConfigurator>) annotationEntry.getType());
View Full Code Here


      String classpathElements= classPath;
      Assembly assembly= new Assembly();
      assembly.setEntryPointClassName(mainClass.getName());
      assembly.setTargetLocation(new File(target));

      DragomeConfigurator configurator= ServiceLocator.getInstance().getConfigurator();
     
      DragomeJsCompiler compiler= new DragomeJsCompiler(configurator.getDefaultCompilerType());
      //      compiler.setBasedir(basedir);
      compiler.addClasspathElements(classpathElements);
      compiler.addClasspathFilter(new FileFilter()
      {
        public boolean accept(File pathname)
        {
          return !pathname.toString().contains("/serverside");
        }
      });

      if (configurator != null)
        compiler.setBytecodeTransformer(configurator.getBytecodeTransformer());

      compiler.addAssembly(assembly);
      compiler.setGenerateLineNumbers(false);
      compiler.setCompression(false);
      compiler.execute();
View Full Code Here

      String classpathElements= classPath;
      Assembly assembly= new Assembly();
      assembly.setEntryPointClassName(mainClass.getName());
      assembly.setTargetLocation(new File(target));

      DragomeConfigurator configurator= ServiceLocator.getInstance().getConfigurator();

      DragomeJsCompiler compiler= new DragomeJsCompiler(configurator.getDefaultCompilerType());
      //      compiler.setBasedir(basedir);
      compiler.addClasspathElements(classpathElements);
      compiler.addClasspathFilter(new FileFilter()
      {
        public boolean accept(File pathname)
        {
          return !pathname.toString().contains(File.separator + "serverside");
        }
      });

      if (configurator != null)
        compiler.setBytecodeTransformer(configurator.getBytecodeTransformer());

      compiler.addAssembly(assembly);
      compiler.setGenerateLineNumbers(false);
      compiler.setCompression(false);
      compiler.execute();
View Full Code Here

    }
  }

  private static DragomeConfigurator getConfigurator()
  {
    DragomeConfigurator configurator= new DefaultDragomeConfigurator();
    List<AnnotationEntry> annotationEntries= AnnotationsHelper.getAnnotationsByType(DragomeConfiguratorImplementor.class).getEntries();
    for (AnnotationEntry annotationEntry : annotationEntries)
    {
      if (!annotationEntry.getType().equals(DefaultDragomeConfigurator.class))
        configurator= ServiceLocator.getInstance().getReflectionService().createClassInstance((Class<? extends DragomeConfigurator>) annotationEntry.getType());
View Full Code Here

  public DragomeConfigurator getConfigurator()
  {
    try
    {
      DragomeConfigurator foundConfigurator= null;
      Reflections reflections= new Reflections("");
      Set<Class<? extends DragomeConfigurator>> configurators= reflections.getSubTypesOf(DragomeConfigurator.class);
      for (Class<? extends DragomeConfigurator> class1 : configurators)
        if (!class1.equals(DefaultDragomeConfigurator.class))
          foundConfigurator= class1.newInstance();
View Full Code Here

      if (classLoader == null)
      {
        ClassLoader lastContextClassLoader= Thread.currentThread().getContextClassLoader();
        classLoader= lastContextClassLoader;

        DragomeConfigurator configurator= ServiceLocator.getInstance().getConfigurator();
        if (configurator != null)
                {
                  ClassLoader parentClassloader= ClassTransformerDragomeWebSocketHandler.class.getClassLoader();
                  classLoader= configurator.getNewClassloaderInstance(parentClassloader, parentClassloader);
                }
      }

      Thread.currentThread().setContextClassLoader(classLoader);
View Full Code Here

TOP

Related Classes of com.dragome.commons.DragomeConfigurator

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.