Package com.sun.tools.xjc.api.util

Examples of com.sun.tools.xjc.api.util.APTClassLoader


    public static int run(String[] args) throws Exception {
        try {
            ClassLoader cl = SchemaGenerator.class.getClassLoader();
            if(cl==null)    cl = ClassLoader.getSystemClassLoader();
            ClassLoader classLoader = new APTClassLoader(cl,packagePrefixes);
            return run(args, classLoader);
        } catch( ToolsJarNotFoundException e) {
            System.err.println(e.getMessage());
            return -1;
        }
View Full Code Here


    return createAptClassLoader( getDefaultClassLoader() );
  }

  @NotNull
  public APTClassLoader createAptClassLoader( @NotNull ClassLoader defaultClassLoader ) throws ToolsJarNotFoundException {
    return new APTClassLoader( defaultClassLoader, getPackagePrefixes().toArray( new String[getPackagePrefixes().size()] ) );
  }
View Full Code Here

    public static int run(String[] args) throws Exception {
        try {
            ClassLoader cl = SchemaGenerator.class.getClassLoader();
            if(cl==null)    cl = ClassLoader.getSystemClassLoader();
            ClassLoader classLoader = new APTClassLoader(cl,packagePrefixes);
            return run(args, classLoader);
        } catch( ToolsJarNotFoundException e) {
            System.err.println(e.getMessage());
            return -1;
        }
View Full Code Here

    return createAptClassLoader( getDefaultClassLoader() );
  }

  @NotNull
  public APTClassLoader createAptClassLoader( @NotNull ClassLoader defaultClassLoader ) throws ToolsJarNotFoundException {
    return new APTClassLoader( defaultClassLoader, getPackagePrefixes().toArray( new String[getPackagePrefixes().size()] ) );
  }
View Full Code Here

    return createAptClassLoader( getDefaultClassLoader() );
  }

  @Nonnull
  public APTClassLoader createAptClassLoader( @Nonnull ClassLoader defaultClassLoader ) throws ToolsJarNotFoundException {
    return new APTClassLoader( defaultClassLoader, getPackagePrefixes().toArray( new String[getPackagePrefixes().size()] ) );
  }
View Full Code Here

    return createAptClassLoader( getDefaultClassLoader() );
  }

  @NotNull
  public APTClassLoader createAptClassLoader( @NotNull ClassLoader defaultClassLoader ) throws ToolsJarNotFoundException {
    return new APTClassLoader( defaultClassLoader, getPackagePrefixes().toArray( new String[getPackagePrefixes().size()] ) );
  }
View Full Code Here

    return createAptClassLoader( getDefaultClassLoader() );
  }

  @NotNull
  public APTClassLoader createAptClassLoader( @NotNull ClassLoader defaultClassLoader ) throws ToolsJarNotFoundException {
    return new APTClassLoader( defaultClassLoader, getPackagePrefixes().toArray( new String[0] ) );
  }
View Full Code Here

    return createAptClassLoader( getDefaultClassLoader() );
  }

  @Nonnull
  public APTClassLoader createAptClassLoader( @Nonnull ClassLoader defaultClassLoader ) throws ToolsJarNotFoundException {
    return new APTClassLoader( defaultClassLoader, getPackagePrefixes().toArray( new String[getPackagePrefixes().size()] ) );
  }
View Full Code Here

    ClassLoader defaultClassLoader = getClass().getClassLoader();
    if ( defaultClassLoader == null ) {
      defaultClassLoader = ClassLoader.getSystemClassLoader();
    }

    ClassLoader aptClassLoader = new APTClassLoader( defaultClassLoader, getPackagePrefixes().toArray( new String[0] ) );
    Thread.currentThread().setContextClassLoader( aptClassLoader );

    Class<?> runnerType = aptClassLoader.loadClass( getRunnerClassName() );

    Object runner = Reflection.constructor().in( runnerType ).newInstance();
    Reflection.method( "generate" ).withParameterTypes( GeneratorConfiguration.class ).in( runner ).invoke( tmpConfiguration );

    System.out.println( "Generation finished!" );
View Full Code Here

TOP

Related Classes of com.sun.tools.xjc.api.util.APTClassLoader

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.