Package org.apache.felix.ipojo.manipulation

Examples of org.apache.felix.ipojo.manipulation.Manipulator.manipulate()


            manipulator.prepare(array);

            byte[] newclazz = new byte[0];
            if (!manipulator.isAlreadyManipulated()) {
                // Step 2 - manipulation
                newclazz = manipulator.manipulate(array);
            }
            m_manipulation = manipulator.getManipulationMetadata();
            m_alreadyManipulated = manipulator.isAlreadyManipulated();
            return newclazz;
        } catch (IOException e) {
View Full Code Here


        }
        byte[] pojo = POJOWriter.dump(clazz, m_name, getFieldList(), getMethodList(), m_handler);
        Manipulator manipulator = new Manipulator(this.getClass().getClassLoader());
        try {
            manipulator.prepare(pojo);
            byte[] newclazz = manipulator.manipulate(pojo);
            m_manipulation = manipulator.getManipulationMetadata();
            return newclazz;
        } catch (IOException e) {
            m_handler.error("An error occurs during the composite implementation creation : " + e.getMessage(), e);
        }
View Full Code Here

     */
    private byte[] manipulate() {
        Manipulator manipulator = new Manipulator();
        try {
            byte[] array = getClassByteArray();
            byte[] newclazz = manipulator.manipulate(array);
            m_manipulation = manipulator.getManipulationMetadata();
            return newclazz;
        } catch (IOException e) {
            throw new IllegalStateException("An exception occurs during implementation class manipulation : " + e.getMessage());
        }
View Full Code Here

            return null;
        }
        byte[] pojo = POJOWriter.dump(clazz, m_name, getFieldList(), getMethodList(), m_handler);
        Manipulator manipulator = new Manipulator();
        try {
            byte[] newclazz = manipulator.manipulate(pojo);
            m_manipulation = manipulator.getManipulationMetadata();
            return newclazz;
        } catch (IOException e) {
            m_handler.error("An error occurs during the composite implementation creation : " + e.getMessage(), e);
        }
View Full Code Here

                    }
                }

                // Now manipulate the classes.
                try {
                    byte[] out = manipulator.manipulate(bytecode);
                    // Call the visitor
                    result.visitManipulatedResource(info.getResourcePath(), out);
                } catch (IOException e) {
                    m_reporter.error("Cannot manipulate the class " + info.getClassName() + " : " + e.getMessage());
                    return;
View Full Code Here

     * @return the generated class (byte array)
     */
    private byte[] manipulateComponent(byte[] in, ComponentInfo ci) {
        Manipulator man = new Manipulator();
        try {
            byte[] out = man.manipulate(in); // iPOJO manipulation
            ci.detectMissingFields(man.getFields()); // Detect missing field
            // Insert information to metadata
            ci.m_componentMetadata.addElement(man.getManipulationMetadata());
            ci.m_isManipulated = true;
            ci.m_inners = man.getInnerClasses();
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.