Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * $Id: ClassFactory.java 56848 2011-12-18 12:11:23Z mrotteveel $
  * 
  * Firebird Open Source J2EE Connector - JDBC Driver
  *
  * Distributable under LGPL license.
  * You may obtain a copy of the License at http://www.gnu.org/copyleft/lgpl.html
  *
  * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * LGPL License for more details.
 *
 * This file was created by members of the firebird development team.
 * All individual contributions remain the Copyright (C) of those
 * individuals.  Contributors to this file are either listed here or
 * can be obtained from a CVS history command.
 *
 * All rights reserved.
 */
package org.firebirdsql.gds;
Returns classes either by the Class.forName method or by using an already cached instance.

Author(s):
Steven Jardine
public class ClassFactory {
    // Many commonly used class names.
    public static final String DriverConnectionPoolDataSource = "org.firebirdsql.pool.DriverConnectionPoolDataSource";
    public static final String FBCallableStatement = "org.firebirdsql.jdbc.FBCallableStatement";
    public static final String FBConnection = "org.firebirdsql.jdbc.FBConnection";
    public static final String FBConnectionPoolDataSource = "org.firebirdsql.pool.FBConnectionPoolDataSource";
    public static final String FBPreparedStatement = "org.firebirdsql.jdbc.FBPreparedStatement";
    public static final String FBStatement = "org.firebirdsql.jdbc.FBStatement";
    public static final String JavaGDSImpl = "org.firebirdsql.gds.impl.wire.JavaGDSImpl";
    private static Logger log = LoggerFactory.getLogger(ClassFactory.classfalse);

    

Parameters:
className the class name to return.
Returns:
the class corresponding to the string class name.
    public static Class get(String className) {
        try {
            return Class.forName(className);
        } catch (ClassNotFoundException e) {
            .error(e.getMessage(), e);
        }
        return null;
    }
New to GrepCode? Check out our FAQ X