Examples of Pojoization


Examples of org.apache.felix.ipojo.manipulator.Pojoization

                }
            }
        }

        AntReporter reporter = new AntReporter(getProject());
        Pojoization pojo = new Pojoization(reporter);
        if (m_ignoreAnnotations) {
            pojo.disableAnnotationProcessing();
        }
        if (!m_ignoreLocalXSD) {
            pojo.setUseLocalXSD();
        }

        Path classpath = getClasspath();
        classpath.addJavaRuntime();

        // Adding the input jar or directory
        if (m_classpath == null) {
            m_classpath = createClasspath();
        }
        Path element = m_classpath.createPath();
        if (m_input != null) {
            element.setLocation(m_input.getAbsoluteFile());
        } else if (m_directory != null) {
            element.setLocation(m_directory.getAbsoluteFile());
        }
        m_classpath.add(element);

        ClassLoader loader = getProject().createClassLoader(getClasspath());
        if (m_input != null) {
            pojo.pojoization(m_input, m_output, m_metadata, loader);
        } else {
            pojo.directoryPojoization(m_directory, m_metadata, m_manifest, loader);
        }
        for (int i = 0; i < reporter.getWarnings().size(); i++) {
            log((String) reporter.getWarnings().get(i), Project.MSG_WARN);
        }
        if (reporter.getErrors().size() > 0) {
View Full Code Here

Examples of org.apache.felix.ipojo.manipulator.Pojoization

        }
        System.out.println("input file     => " + m_input.getAbsolutePath());
    }

    private void manipulate() {
        m_pojoization = new Pojoization();
        m_pojoization.pojoization(m_input, m_output, m_metadata);
    }
View Full Code Here

Examples of org.apache.felix.ipojo.manipulator.Pojoization

import org.apache.felix.ipojo.manipulator.Pojoization;

public class PojoizationTest extends TestCase {

  public void testJarManipulation() {
    Pojoization pojoization = new Pojoization();
    File in = new File("target/test-classes/tests.manipulation-no-annotations.jar");
    File out = new File("target/test-classes/tests.manipulation-no-annotations-manipulated.jar");
    out.delete();
    File metadata = new File("target/test-classes/metadata.xml");
    pojoization.pojoization(in, out, metadata);

    Assert.assertTrue(out.exists());
  }
View Full Code Here

Examples of org.apache.felix.ipojo.manipulator.Pojoization

    Assert.assertTrue(out.exists());
  }

  public void testManipulationWithAnnotations() {
    Pojoization pojoization = new Pojoization();
    File in = new File("target/test-classes/tests.manipulator-annotations.jar");
    File out = new File("target/test-classes/tests.manipulation-annotations-manipulated.jar");
    out.delete();
    pojoization.pojoization(in, out, (File) null);

    Assert.assertTrue(out.exists());
  }
View Full Code Here

Examples of org.apache.felix.ipojo.manipulator.Pojoization

    Assert.assertTrue(out.exists());
  }

  public void testJarManipulationJava5() {
    Pojoization pojoization = new Pojoization();
    File in = new File("target/test-classes/tests.manipulation.java5.jar");
    File out = new File("target/test-classes/tests.manipulation.java5-manipulated.jar");
    out.delete();
    pojoization.pojoization(in, out, (File) null);

    Assert.assertTrue(out.exists());
  }
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.