mil.dod.th.ose.jaxb.proto.converter/src/mil/dod/th/ose/jaxbprotoconverter/JaxbClassParser.java
private Class<?> findEnumBaseClass(final Class<?> enumClass)
    {
        try
        {
            return Class.forName(enumClass.getName().replace(ProtoEnum.ENUM, ""));
        }
        catch (final ClassNotFoundException ex)
        {   //NOCHECKSTYLE
            //Class might not exist.
        }
        
        //Array of all JAXB packages. Used to check for enumeration base classes.
        //TODO TH-3097: Remove this array and associated logic.
        final String[] packages = 
        {
            "mil.dod.th.core.asset.capability",
            "mil.dod.th.core.asset.commands",
            "mil.dod.th.core.asset.types.ccbase",
            "mil.dod.th.core.capability",
            "mil.dod.th.core.ccomm.link.capability",
            "mil.dod.th.ocre.ccomm.physical.capability",
            "mil.dod.th.core.ccomm.transport.capability",
            "mil.dod.th.core.controller.capability",
            "mil.dod.th.core.observation.types",
            "mil.dod.th.core.types",
            "mil.dod.th.core.types.spatial"
        };
        
        final String simpleClassName = enumClass.getSimpleName().replace(ProtoEnum.ENUM, "");
        for (String packageName: packages)
        {
            try
            {
                return Class.forName(packageName + "." + simpleClassName); 
            }
            catch (final ClassNotFoundException ex)
            {   //NOCHECKSTYLE
                //Class might not exist.
            }
        }
        return null;
    }
/**
     * Method used to find the base class for a enumeration.
     * 
     * @param enumClass
     *          Enumeration class to find the associated base class for.
     * @return
     *          The base class for the enumeration or null if one does not exist.
     */
Method used to find the base class for a enumeration.

@param enumClass
Enumeration class to find the associated base class for.
@return
The base class for the enumeration or null if one does not exist.
Method used to find the base class for a enumeration . @param enumClass Enumeration class to find the associated base class for . @return The base class for the enumeration or null if one does not exist .
private Class<?> findEnumBaseClass(final Class<?> enumClass)
    {
        try
        {
            return Class.forName(enumClass.getName().replace(ProtoEnum.ENUM, ""));
        }
        catch (final ClassNotFoundException ex)
        {   
        }
        final String[] packages = 
        {
            "mil.dod.th.core.asset.capability",
            "mil.dod.th.core.asset.commands",
            "mil.dod.th.core.asset.types.ccbase",
            "mil.dod.th.core.capability",
            "mil.dod.th.core.ccomm.link.capability",
            "mil.dod.th.ocre.ccomm.physical.capability",
            "mil.dod.th.core.ccomm.transport.capability",
            "mil.dod.th.core.controller.capability",
            "mil.dod.th.core.observation.types",
            "mil.dod.th.core.types",
            "mil.dod.th.core.types.spatial"
        };
        final String simpleClassName = enumClass.getSimpleName().replace(ProtoEnum.ENUM, "");
        for (String packageName: packages)
        {
            try
            {
                return Class.forName(packageName + "." + simpleClassName); 
            }
            catch (final ClassNotFoundException ex)
            {   
            }
        }
        return null;
    }
private Class < ? > findEnumBaseClass ( final Class < ? > enumClass ) { try { return Class . forName ( enumClass . getName ( ) . replace ( ProtoEnum . ENUM , "" ) ) ; } catch ( final ClassNotFoundException ex ) { } final String [ ] packages = { "mil.dod.th.core.asset.capability" , "mil.dod.th.core.asset.commands" , "mil.dod.th.core.asset.types.ccbase" , "mil.dod.th.core.capability" , "mil.dod.th.core.ccomm.link.capability" , "mil.dod.th.ocre.ccomm.physical.capability" , "mil.dod.th.core.ccomm.transport.capability" , "mil.dod.th.core.controller.capability" , "mil.dod.th.core.observation.types" , "mil.dod.th.core.types" , "mil.dod.th.core.types.spatial" } ; final String simpleClassName = enumClass . getSimpleName ( ) . replace ( ProtoEnum . ENUM , "" ) ; for ( String packageName : packages ) { try { return Class . forName ( packageName + "." + simpleClassName ) ; } catch ( final ClassNotFoundException ex ) { } } return null ; }
Method used to find the base class for a enumeration.
Method used to find the base class for a enumeration .
//NOCHECKSTYLE //Class might not exist. //Array of all JAXB packages. Used to check for enumeration base classes. //TODO TH-3097: Remove this array and associated logic. //NOCHECKSTYLE //Class might not exist.