public static StatsImpl create(String statsType, String name, int type, int level,
                                   long time, ArrayList dataMembers, ArrayList subCollections) {
        StatsImpl toReturn = null;

        // always return the base stats since there is no more specific stats created in pmi.
        // specific stats are created only when using J2EE interfaces in pmi.j2ee component.
        toReturn = new StatsImpl(statsType, name, type, level, dataMembers, subCollections);
        toReturn.time = time;

        return toReturn;

        /*
         * // Not sure why we'd get a null statsType...
         * if (statsType == null) {
         * System.out.println("got null statsType for stats: " + name);
         * toReturn = new StatsImpl( statsType, name, type, level, dataMembers, subCollections );
         * toReturn.time = time;
         * 
         * return toReturn;
         * }
         * 
         * if ( statsType.equals( PmiConstants.BEAN_MODULE ) ) {
         * toReturn = new EJBStatsImpl( name, type, level, dataMembers, subCollections );
         * toReturn.time = time;
         * 
         * return toReturn;
         * }
         * else if ( statsType.equals( PmiConstants.J2C_MODULE ) ) {
         * toReturn = new JCAStatsImpl( name, type, level, dataMembers, subCollections );
         * toReturn.time = time;
         * 
         * return toReturn;
         * }
         * else if ( statsType.equals( PmiConstants.CONNPOOL_MODULE ) ) {
         * toReturn = new JDBCConnectionStatsImpl( name, type, level, dataMembers, subCollections );
         * toReturn.time = time;
         * 
         * return toReturn;
         * }
         * else if ( statsType.equals( PmiConstants.TRAN_MODULE ) ) {
         * toReturn = new JTAStatsImpl( name, type, level, dataMembers, subCollections );
         * toReturn.time = time;
         * 
         * return toReturn;
         * }
         * else if ( statsType.equals( PmiConstants.RUNTIME_MODULE ) ) {
         * toReturn = new JVMStatsImpl( name, type, level, dataMembers, subCollections );
         * toReturn.time = time;
         * 
         * return toReturn;
         * }
         * 
         * // default
         * else {
         * toReturn = new StatsImpl(statsType, name, type, level, dataMembers, subCollections );
         * toReturn.time = time;
         * 
         * return toReturn;
         * }
         */
    }
public static StatsImpl create ( String statsType , String name , int type , int level , long time , ArrayList dataMembers , ArrayList subCollections ) { StatsImpl toReturn = null ; toReturn = new StatsImpl ( statsType , name , type , level , dataMembers , subCollections ) ; toReturn . time = time ; return toReturn ; }
/**
Creates the specified <code>StatsImpl</code> instance from the specified
parameters.

@param statstype The <code>StatsImpl</code> sub-class to create
@param name Name of the Stats
@param type Type of the Stats
@param level Stats level
@param time Time Stats was created
@param dataMembers ArrayList of SPIStatistics
@param subCollections ArrayList of SPIStats
@return the created <code>StatsImpl</code>