Examples of SGStateInfo


Examples of org.exolab.castor.builder.SGStateInfo

        _generator.generateSource(inputSource, getClass().getPackage()
                .getName()
                + ".generated.simple");

        // get the Source Generator's state Info
        SGStateInfo sgState = _generator.getSGStateInfo();

        assertNotNull(sgState);

        /*
         * Get all elements (=keys) the ClassInfoResolver knows of. For these
         * keys the SourceGenerator created ClassInfos in which we are
         * interested.
         */
        Enumeration enumeration = sgState.keys();

        assertTrue(enumeration.hasMoreElements());

        List cInfos = new ArrayList();
        /*
         * Get all ClassInfos. Note that during the source generation process
         * ClassInfos are actually added twice to the ClassInfoResolver's cache:
         * - once with the XMLBindingComponent/ClassInfo
         * - and with the JClass/ClassInfo
         * as key/value pair.
         * Therefore we only get those ClassInfos with a
         * XMLBindingComponent/ClassInfo pair to avoid duplicates!
         */
        while (enumeration.hasMoreElements()) {
            Object elem = enumeration.nextElement();
            if (!(elem instanceof JClass)) {
                cInfos.add(sgState.resolve(elem));
            }
        }

        assertEquals(1, cInfos.size());

View Full Code Here

Examples of org.exolab.castor.builder.SGStateInfo

        _generator.generateSource(inputSource, getClass().getPackage()
                .getName()
                + ".generated.entity");
       
     // get the Source Generator's state Info
        SGStateInfo sgState = _generator.getSGStateInfo();

        assertNotNull(sgState);

        /*
         * Get all elements (=keys) the ClassInfoResolver knows of. For these
         * keys the SourceGenerator created ClassInfos in which we are
         * interested.
         */
        Enumeration enumeration = sgState.keys();

        assertTrue(enumeration.hasMoreElements());

        List cInfos = new ArrayList();
        /*
         * Get all ClassInfos. Note that during the source generation process
         * ClassInfos are actually added twice to the ClassInfoResolver's cache:
         * - once with the XMLBindingComponent/ClassInfo
         * - and with the JClass/ClassInfo
         * as key/value pair.
         * Therefore we only get those ClassInfos with a
         * XMLBindingComponent/ClassInfo pair to avoid duplicates!
         */
        while (enumeration.hasMoreElements()) {
            Object elem = enumeration.nextElement();
            if (!(elem instanceof JClass)) {
                cInfos.add(sgState.resolve(elem));
            }
        }

        assertEquals(2, cInfos.size());
       
View Full Code Here

Examples of org.exolab.castor.builder.SGStateInfo

        _generator.generateSource(inputSource, getClass().getPackage()
                .getName()
                + ".generated.noJDO");

        // get the Source Generator's state Info
        SGStateInfo sgState = _generator.getSGStateInfo();

        assertNotNull(sgState);
       
        /*
         * Get all elements (=keys) the ClassInfoResolver knows of. For these
         * keys the SourceGenerator created ClassInfos in which we are
         * interested.
         */
        Enumeration enumeration = sgState.keys();

        assertTrue(enumeration.hasMoreElements());

        List cInfos = new ArrayList();
        /*
         * Get all ClassInfos. Note that during the source generation process
         * ClassInfos are actually added twice to the ClassInfoResolver's cache:
         * - once with the XMLBindingComponent/ClassInfo
         * - and with the JClass/ClassInfo
         * as key/value pair.
         * Therefore we only get those ClassInfos with a
         * XMLBindingComponent/ClassInfo pair to avoid duplicates!
         */
        while (enumeration.hasMoreElements()) {
            Object elem = enumeration.nextElement();
            if (!(elem instanceof JClass)) {
                cInfos.add(sgState.resolve(elem));
            }
        }
       
        for (int i = 0; i < cInfos.size(); ++i) {
            ClassInfo cInfo = (ClassInfo) cInfos.get(i);
View Full Code Here

Examples of org.exolab.castor.builder.SGStateInfo

        _generator.generateSource(inputSource, getClass().getPackage()
                .getName()
                + ".generated.complexContent");

        // get the Source Generator's state Info
        SGStateInfo sgState = _generator.getSGStateInfo();

        assertNotNull(sgState);
       
        /*
         * Get all elements (=keys) the ClassInfoResolver knows of. For these
         * keys the SourceGenerator created ClassInfos in which we are
         * interested.
         */
        Enumeration enumeration = sgState.keys();

        assertTrue(enumeration.hasMoreElements());

        List cInfos = new ArrayList();
        /*
         * Get all ClassInfos. Note that during the source generation process
         * ClassInfos are actually added twice to the ClassInfoResolver's cache:
         * - once with the XMLBindingComponent/ClassInfo
         * - and with the JClass/ClassInfo
         * as key/value pair.
         * Therefore we only get those ClassInfos with a
         * XMLBindingComponent/ClassInfo pair to avoid duplicates!
         */
        while (enumeration.hasMoreElements()) {
            Object elem = enumeration.nextElement();
            if (!(elem instanceof JClass)) {
                cInfos.add(sgState.resolve(elem));
            }
        }
       
        assertEquals(2, cInfos.size());
       
View Full Code Here

Examples of org.exolab.castor.builder.SGStateInfo

        }

        XMLInfoNature xmlNature = new XMLInfoNature(fieldInfo);
       
        if (CLASS_METHOD_SUFFIX.equals(fieldInfo.getMethodSuffix())) {
            SGStateInfo sInfo = state.getSGStateInfo();
            if (!sInfo.getSuppressNonFatalWarnings()) {
                String warn = "warning a field name conflicts with \""
                    + CLASS_KEYWORD + "\", please use a binding file to specify "
                    + "a different name for the " + xmlNature.getNodeTypeName()
                    + " '" + xmlNature.getNodeName() + "'.";
                sInfo.getDialog().notify(warn);
            }
        } else if (CLASS_KEYWORD.equals(xmlNature.getNodeName())) {
            SGStateInfo sInfo = state.getSGStateInfo();
            if (!sInfo.getSuppressNonFatalWarnings()) {
                String warn = "warning a field name conflicts with \""
                    + CLASS_KEYWORD + "\" and is being replaced by \"clazz\". "
                    + "You may use a binding file to specify a different "
                    + "name for the " + xmlNature.getNodeTypeName()
                    + " '" + xmlNature.getNodeName() + "'.";
                sInfo.getDialog().notify(warn);
            }
        }
       
        processAppInfo(component.getAnnotated(), fieldInfo);
       
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.