mil.dod.th.ose.gui.webapp/src/mil/dod/th/ose/gui/webapp/utils/AssetCommandUtil.java
public static Command instantiateCommandBasedOnType(final CommandTypeEnum commandType) throws 
            ClassNotFoundException, InstantiationException, IllegalAccessException
    {
        final String packageName = Command.class.getPackage().getName();
        final String className = commandTypeToClassName(commandType);            
        final Class<?> commandClass = Class.forName(packageName + "." + className);
        
        return (Command)commandClass.newInstance();
    }
/**
     * Method to generate a command instance based on the given type.
     * @param commandType
     *      The {@link CommandTypeEnum} that represents the type of command to be instantiated
     * @return
     *      the command instance that has been generated from the given type
     * @throws ClassNotFoundException
     *      Thrown if the class for the command to be instantiated cannot be found. 
     * @throws InstantiationException
     *      Thrown if the command object cannot be instantiated using reflections.
     * @throws IllegalAccessException
     *      Thrown if the command class to be instantiated cannot be accessed.
     */
Method to generate a command instance based on the given type.
@param commandType
The  CommandTypeEnum that represents the type of command to be instantiated
@return
the command instance that has been generated from the given type
@throws ClassNotFoundException
Thrown if the class for the command to be instantiated cannot be found.
@throws InstantiationException
Thrown if the command object cannot be instantiated using reflections.
@throws IllegalAccessException
Thrown if the command class to be instantiated cannot be accessed.
Method to generate a command instance based on the given type . @param commandType The CommandTypeEnum that represents the type of command to be instantiated @return the command instance that has been generated from the given type @throws ClassNotFoundException Thrown if the class for the command to be instantiated cannot be found . @throws InstantiationException Thrown if the command object cannot be instantiated using reflections . @throws IllegalAccessException Thrown if the command class to be instantiated cannot be accessed .
public static Command instantiateCommandBasedOnType(final CommandTypeEnum commandType) throws 
            ClassNotFoundException, InstantiationException, IllegalAccessException
    {
        final String packageName = Command.class.getPackage().getName();
        final String className = commandTypeToClassName(commandType);            
        final Class<?> commandClass = Class.forName(packageName + "." + className);
        return (Command)commandClass.newInstance();
    }
public static Command instantiateCommandBasedOnType ( final CommandTypeEnum commandType ) throws ClassNotFoundException , InstantiationException , IllegalAccessException { final String packageName = Command . class . getPackage ( ) . getName ( ) ; final String className = commandTypeToClassName ( commandType ) ; final Class < ? > commandClass = Class . forName ( packageName + "." + className ) ; return ( Command ) commandClass . newInstance ( ) ; }
Method to generate a command instance based on the given type.
Method to generate a command instance based on the given type .