Examples of KrakatauLibrary


Examples of com.alexkasko.krakatau.KrakatauLibrary

    /**
     * {@inheritDoc}
     */
    @Override
    public void execute() throws MojoExecutionException, MojoFailureException {
        KrakatauLibrary lib = new KrakatauLibrary();
        if(!outputDir.exists()) outputDir.mkdirs();
        lib.assemble(Arrays.asList(asmFileOrDirs), outputDir);
    }
View Full Code Here

Examples of com.alexkasko.krakatau.KrakatauLibrary

    /**
     * {@inheritDoc}
     */
    @Override
    public void execute() throws MojoExecutionException, MojoFailureException {
        KrakatauLibrary lib = new KrakatauLibrary();
        Set<Artifact> deps = project.getDependencyArtifacts();
        List<File> classpath = new ArrayList<File>(deps.size());
        for(Artifact ar : deps) {
            classpath.add(ar.getFile());
        }
        for(File fi : classDirs) {
            classpath.add(fi);
        }
        if(!outputDir.exists()) outputDir.mkdirs();
        lib.decompile(classpath, Arrays.asList(classNames), outputDir);
    }
View Full Code Here

Examples of com.alexkasko.krakatau.KrakatauLibrary

    /**
     * {@inheritDoc}
     */
    @Override
    public void execute() throws MojoExecutionException, MojoFailureException {
        KrakatauLibrary lib = new KrakatauLibrary();
        Set<Artifact> deps = project.getDependencyArtifacts();
        List<File> classpath = new ArrayList<File>(deps.size());
        for(Artifact ar : deps) {
            classpath.add(ar.getFile());
        }
        if(!outputDir.exists()) outputDir.mkdirs();
        lib.compile(Arrays.asList(sourceFileOrDirs), classpath, outputDir, new OutputStreamWriter(System.err));
    }
View Full Code Here

Examples of com.alexkasko.krakatau.KrakatauLibrary

    /**
     * {@inheritDoc}
     */
    @Override
    public void execute() throws MojoExecutionException, MojoFailureException {
        KrakatauLibrary lib = new KrakatauLibrary();
        if(!outputDir.exists()) outputDir.mkdirs();
        lib.disassemble(Arrays.asList(classFileOrDirs), outputDir);
    }
View Full Code Here

Examples of com.alexkasko.krakatau.KrakatauLibrary

    /**
     * {@inheritDoc}
     */
    @Override
    public void execute() throws MojoExecutionException, MojoFailureException {
        KrakatauLibrary lib = new KrakatauLibrary();
        Set<Artifact> deps = project.getDependencyArtifacts();
        List<File> classpath = new ArrayList<File>(deps.size());
        for(Artifact ar : deps) {
            classpath.add(ar.getFile());
        }
        for(File fi : classDirs) {
            classpath.add(fi);
        }
        if(!outputDir.exists()) outputDir.mkdirs();
        lib.decompile(classpath, Arrays.asList(classNames), outputDir);
    }
View Full Code Here

Examples of com.alexkasko.krakatau.KrakatauLibrary

    /**
     * {@inheritDoc}
     */
    @Override
    public void execute() throws MojoExecutionException, MojoFailureException {
        KrakatauLibrary lib = new KrakatauLibrary();
        Set<Artifact> deps = project.getDependencyArtifacts();
        List<File> classpath = new ArrayList<File>(deps.size());
        for(Artifact ar : deps) {
            classpath.add(ar.getFile());
        }
        if(!outputDir.exists()) outputDir.mkdirs();
        lib.compile(Arrays.asList(sourceFileOrDirs), classpath, outputDir, new OutputStreamWriter(System.err));
    }
View Full Code Here

Examples of com.alexkasko.krakatau.KrakatauLibrary

                    0 == cline.getArgs().length) {
                List<String> names = argToStringList(cline.getOptionValue(DECOMPILE_OPTION));
                List<File> classpath = argToFileList(cline.getOptionValue(CLASSPATH_OPTION));
                File dir = new File(cline.getOptionValue(OUTPUT_OPTION));
                System.out.println("Initializing decompiler ...");
                new KrakatauLibrary().decompile(classpath, names, dir);
            } else if (cline.hasOption(DISASSEMBLE_OPTION) &&
                    cline.hasOption(OUTPUT_OPTION) &&
                    0 == cline.getArgs().length) {
                List<File> files = argToFileList(cline.getOptionValue(DISASSEMBLE_OPTION));
                File dir = new File(cline.getOptionValue(OUTPUT_OPTION));
                System.out.println("Initializing disassembler ...");
                new KrakatauLibrary().disassemble(files, dir);
            } else if (cline.hasOption(ASSEMBLE_OPTION) &&
                    cline.hasOption(OUTPUT_OPTION) &&
                    0 == cline.getArgs().length) {
                List<File> files = argToFileList(cline.getOptionValue(ASSEMBLE_OPTION));
                File dir = new File(cline.getOptionValue(OUTPUT_OPTION));
                System.out.println("Initializing assembler ...");
                new KrakatauLibrary().assemble(files, dir);
            } else if(cline.hasOption(COMPILE_OPTION) &&
                    cline.hasOption(OUTPUT_OPTION) &&
                    0 == cline.getArgs().length) {
                System.out.println("Initializing compiler ...");
                List<File> sources = argToFileList(cline.getOptionValue(COMPILE_OPTION));
                List<File> classpath = cline.hasOption(CLASSPATH_OPTION) ?
                        argToFileList(cline.getOptionValue(CLASSPATH_OPTION)) :
                        Collections.<File>emptyList();
                File dir = new File(cline.getOptionValue(OUTPUT_OPTION));
                new KrakatauLibrary().compile(sources, classpath, dir, new OutputStreamWriter(System.err));
                System.out.println("Compilation complete");
            } else {
                throw new ParseException("Invalid arguments:");
            }
        } catch (ParseException e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.