Package org.eclipse.persistence.internal.jaxb

Examples of org.eclipse.persistence.internal.jaxb.JaxbClassLoader


        cw.visitAttribute(attr);

        cw.visitEnd();

        byte[] classBytes =cw.toByteArray();
        JaxbClassLoader loader = (JaxbClassLoader)helper.getClassLoader();
        Class generatedClass = loader.generateClass(className, classBytes);
        return generatedClass;
    }
View Full Code Here


              }
        }

        TypeMappingInfo tmi = nextElement.getTypeMappingInfo();
        Class generatedClass = null;
        JaxbClassLoader loader = (JaxbClassLoader)helper.getClassLoader();
        if(tmi != null){
            generatedClass = CompilerHelper.getExisitingGeneratedClass(tmi, typeMappingInfoToGeneratedClasses, typeMappingInfoToAdapterClasses, helper.getClassLoader());
            if(generatedClass == null){
              generatedClass = this.generateWrapperClass(loader.nextAvailableGeneratedClassName(), attributeTypeName, nextElement.isList(), next);
            }

            typeMappingInfoToGeneratedClasses.put(tmi, generatedClass);
        }else{
            generatedClass = this.generateWrapperClass(loader.nextAvailableGeneratedClassName(), attributeTypeName, nextElement.isList(), next);
        }

          this.qNamesToGeneratedClasses.put(next, generatedClass);
          try{
              Class declaredClass = PrivilegedAccessHelper.getClassForName(nextClassName, false, helper.getClassLoader());
View Full Code Here

        cw.visitEnd();

        byte[] classBytes = cw.toByteArray();

        JaxbClassLoader loader = (JaxbClassLoader)helper.getClassLoader();
        Class generatedClass = loader.generateClass(className, classBytes);
        return generatedClass;
    }
View Full Code Here

        byte[] classBytes = cw.toByteArray();
        return generateClassFromBytes(qualifiedClassName, classBytes);
    }

    private Class generateClassFromBytes(String className, byte[] classBytes) {
        JaxbClassLoader loader = (JaxbClassLoader) helper.getClassLoader();
        Class generatedClass = loader.generateClass(className, classBytes);
        return generatedClass;

    }
View Full Code Here

    }

    public static javax.xml.bind.JAXBContext createContext(Class[] classesToBeBound, java.util.Map properties, ClassLoader classLoader) throws JAXBException {
        javax.xml.bind.JAXBContext jaxbContext = null;
        XMLContext xmlContext = null;
        JaxbClassLoader loader = new JaxbClassLoader(classLoader);
        Generator generator = new Generator(new JavaModelInputImpl(classesToBeBound, new JavaModelImpl(loader)));
        try {
            Project proj = generator.generateProject();
            ConversionManager conversionManager = null;
            if (classLoader != null) {
View Full Code Here

    mv.visitMaxs(1 + objectType.getSize(), 1);         
    classWriter.visitEnd();
   
    byte[] classBytes = classWriter.toByteArray();
   
    JaxbClassLoader loader = (JaxbClassLoader)helper.getClassLoader();
    Class generatedClass = loader.generateClass(className, classBytes);
    return generatedClass;
    }     
View Full Code Here

        }
        for (Entry<String, XmlBindings> entry : xmlBindings.entrySet()) {
            typesToBeBound = getXmlBindingsClasses(entry.getValue(), classLoader, typesToBeBound);
        }

        JaxbClassLoader loader = new JaxbClassLoader(classLoader, typesToBeBound);
        typesToBeBound = updateTypesWithObjectFactory(typesToBeBound, loader);
        JavaModelImpl jModel;
        if(annotationHelper != null) {
          jModel = new JavaModelImpl(loader, annotationHelper);
        } else {
View Full Code Here

     * This means of creating a JAXBContext is aimed at creating a JAXBContext
     * based on method parameters.  This method is useful when JAXB is used as
     * the binding layer for a Web Service provider.
     */
    private static JAXBContext createContext(Class[] classesToBeBound, Map properties, ClassLoader classLoader, Map<String, XmlBindings> xmlBindings) throws JAXBException {
        JaxbClassLoader loader = new JaxbClassLoader(classLoader, classesToBeBound);
        String defaultTargetNamespace = null;
        AnnotationHelper annotationHelper = null;
        if(properties != null) {
            defaultTargetNamespace = (String)properties.get(DEFAULT_TARGET_NAMESPACE_KEY);
            annotationHelper = (AnnotationHelper)properties.get(ANNOTATION_HELPER_KEY);
View Full Code Here

        cw.visitAttribute(attr);

        cw.visitEnd();

        byte[] classBytes =cw.toByteArray();
        JaxbClassLoader loader = (JaxbClassLoader)helper.getClassLoader();
        Class generatedClass = loader.generateClass(className, classBytes);
        return generatedClass;
    }
View Full Code Here

        cw.visitEnd();

        byte[] classBytes = cw.toByteArray();

        JaxbClassLoader loader = (JaxbClassLoader)helper.getClassLoader();
        Class generatedClass = loader.generateClass(className, classBytes);
        return generatedClass;
    }
View Full Code Here

TOP

Related Classes of org.eclipse.persistence.internal.jaxb.JaxbClassLoader

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.