mil.dod.th.ose.sdk/src/mil/dod/th/ose/sdk/those/ProjectGenerator.java
private String convertTemplateNameToJavaName(final String templateFileName, final String className,
            final ProjectType projectType)
    {
        final String javaFileName;

        if (templateFileName.equals("ExampleAttributes.java"))
        {
            // attribute file is used for all types
            return String.format("%sAttributes.java", className);
        }

        switch (projectType)
        {
            case PROJECT_ASSET:
                javaFileName = templateFileName.replaceAll("ExampleAsset", className);
                break;

            case PROJECT_LINKLAYER:
                javaFileName = templateFileName.replaceAll("ExampleLinkLayer", className);
                break;

            case PROJECT_PHYLINK:
                javaFileName = templateFileName.replaceAll("ExamplePhysicalLink", className);
                break;

            case PROJECT_TRANSPORTLAYER:
                javaFileName = templateFileName.replaceAll("ExampleTransportLayer", className);
                break;

            default:
                throw new IllegalArgumentException("Invalid project type is set for convertTemplateNameToJavaName()");
        }

        return javaFileName;
    }
/**
     * Converts a Java template file name to match up with the proper class name.
     * 
     * @param templateFileName
     *            name of the template file
     * @param className
     *            name of the Java class
     * @param projectType
     *            type of project
     * @return file name based on the Java class name
     */
Converts a Java template file name to match up with the proper class name.

@param templateFileName
name of the template file
@param className
name of the Java class
@param projectType
type of project
@return file name based on the Java class name
Converts a Java template file name to match up with the proper class name . @param templateFileName name of the template file @param className name of the Java class @param projectType type of project @return file name based on the Java class name
private String convertTemplateNameToJavaName(final String templateFileName, final String className,
            final ProjectType projectType)
    {
        final String javaFileName;
        if (templateFileName.equals("ExampleAttributes.java"))
        {
            return String.format("%sAttributes.java", className);
        }
        switch (projectType)
        {
            case PROJECT_ASSET:
                javaFileName = templateFileName.replaceAll("ExampleAsset", className);
                break;
            case PROJECT_LINKLAYER:
                javaFileName = templateFileName.replaceAll("ExampleLinkLayer", className);
                break;
            case PROJECT_PHYLINK:
                javaFileName = templateFileName.replaceAll("ExamplePhysicalLink", className);
                break;
            case PROJECT_TRANSPORTLAYER:
                javaFileName = templateFileName.replaceAll("ExampleTransportLayer", className);
                break;
            default:
                throw new IllegalArgumentException("Invalid project type is set for convertTemplateNameToJavaName()");
        }
        return javaFileName;
    }
private String convertTemplateNameToJavaName ( final String templateFileName , final String className , final ProjectType projectType ) { final String javaFileName ; if ( templateFileName . equals ( "ExampleAttributes.java" ) ) { return String . format ( "%sAttributes.java" , className ) ; } switch ( projectType ) { case PROJECT_ASSET : javaFileName = templateFileName . replaceAll ( "ExampleAsset" , className ) ; break ; case PROJECT_LINKLAYER : javaFileName = templateFileName . replaceAll ( "ExampleLinkLayer" , className ) ; break ; case PROJECT_PHYLINK : javaFileName = templateFileName . replaceAll ( "ExamplePhysicalLink" , className ) ; break ; case PROJECT_TRANSPORTLAYER : javaFileName = templateFileName . replaceAll ( "ExampleTransportLayer" , className ) ; break ; default : throw new IllegalArgumentException ( "Invalid project type is set for convertTemplateNameToJavaName()" ) ; } return javaFileName ; }
Converts a Java template file name to match up with the proper class name.
Converts a Java template file name to match up with the proper class name .
// attribute file is used for all types