mil.dod.th.ose.jaxb.proto.converter/src/mil/dod/th/ose/jaxbprotoconverter/xsd/XsdParser.java
private void handleComplexType(final Element element, final Element parentElement, final XsdNamespace xsdNamespace, 
            final XsdType type, final File xsdFile) throws ClassNotFoundException, JaxbProtoConvertException
    {
        final String overriddenName = getNameOverride(element.getChildNodes());
        final String elementName = 
                element.getAttribute("name"); //NOCHECKSTYLE Duplicate string is more readable
        final String typeName = elementName.isEmpty() ? parentElement.getAttribute("name") : elementName;
        
        if (type == null)
        {
            final Class<?> newJaxbClass = determineJaxbClass(xsdFile, WordUtils.capitalize(typeName));
            final XsdType newType = getOrCreateXsdType(xsdNamespace, xsdFile, newJaxbClass, overriddenName);
            traverseNodes(element.getChildNodes(), element, xsdNamespace, newJaxbClass, newType, xsdFile, 1);
        }
        else
        {
            throw new IllegalArgumentException(String.format("XSD parser does not handle nested complex "
                    + "types. Consider refactoring the XSD file. Type: %s File: %s", typeName, 
                    xsdFile.getAbsolutePath()));
        }
    }
/**
     * Method that handles an XSD element that is a complex type.
     * 
     * @param element
     *      XML element that represents the complex type.
     * @param parentElement
     *      Parent element of the complex type.
     * @param xsdNamespace
     *      XSD namespace the complex type belongs to.
     * @param type
     *      XSD type the complex type belongs to.
     * @param xsdFile
     *      XSD file the complex type is in.
     * @throws ClassNotFoundException
     *      Thrown if no JAXB class can be found for the complex type.
     * @throws JaxbProtoConvertException
     *      Thrown if a duplicate overridden ID is encountered.
     */
Method that handles an XSD element that is a complex type.

@param element
XML element that represents the complex type.
@param parentElement
Parent element of the complex type.
@param xsdNamespace
XSD namespace the complex type belongs to.
Method that handles an XSD element that is a complex type . @param element XML element that represents the complex type . @param parentElement Parent element of the complex type . @param xsdNamespace XSD namespace the complex type belongs to .
private void handleComplexType(final Element element, final Element parentElement, final XsdNamespace xsdNamespace, 
            final XsdType type, final File xsdFile) throws ClassNotFoundException, JaxbProtoConvertException
    {
        final String overriddenName = getNameOverride(element.getChildNodes());
        final String elementName = 
                element.getAttribute("name"); 
        final String typeName = elementName.isEmpty() ? parentElement.getAttribute("name") : elementName;
        if (type == null)
        {
            final Class<?> newJaxbClass = determineJaxbClass(xsdFile, WordUtils.capitalize(typeName));
            final XsdType newType = getOrCreateXsdType(xsdNamespace, xsdFile, newJaxbClass, overriddenName);
            traverseNodes(element.getChildNodes(), element, xsdNamespace, newJaxbClass, newType, xsdFile, 1);
        }
        else
        {
            throw new IllegalArgumentException(String.format("XSD parser does not handle nested complex "
                    + "types. Consider refactoring the XSD file. Type: %s File: %s", typeName, 
                    xsdFile.getAbsolutePath()));
        }
    }
private void handleComplexType ( final Element element , final Element parentElement , final XsdNamespace xsdNamespace , final XsdType type , final File xsdFile ) throws ClassNotFoundException , JaxbProtoConvertException { final String overriddenName = getNameOverride ( element . getChildNodes ( ) ) ; final String elementName = element . getAttribute ( "name" ) ; final String typeName = elementName . isEmpty ( ) ? parentElement . getAttribute ( "name" ) : elementName ; if ( type == null ) { final Class < ? > newJaxbClass = determineJaxbClass ( xsdFile , WordUtils . capitalize ( typeName ) ) ; final XsdType newType = getOrCreateXsdType ( xsdNamespace , xsdFile , newJaxbClass , overriddenName ) ; traverseNodes ( element . getChildNodes ( ) , element , xsdNamespace , newJaxbClass , newType , xsdFile , 1 ) ; } else { throw new IllegalArgumentException ( String . format ( "XSD parser does not handle nested complex " + "types. Consider refactoring the XSD file. Type: %s File: %s" , typeName , xsdFile . getAbsolutePath ( ) ) ) ; } }
Method that handles an XSD element that is a complex type.
Method that handles an XSD element that is a complex type .
//NOCHECKSTYLE Duplicate string is more readable