当前位置: 首页>>代码示例>>Java>>正文


Java ClassUtil.forName方法代码示例

本文整理汇总了Java中org.seasar.framework.util.ClassUtil.forName方法的典型用法代码示例。如果您正苦于以下问题:Java ClassUtil.forName方法的具体用法?Java ClassUtil.forName怎么用?Java ClassUtil.forName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.seasar.framework.util.ClassUtil的用法示例。


在下文中一共展示了ClassUtil.forName方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getGeneratorClass

import org.seasar.framework.util.ClassUtil; //导入方法依赖的package包/类
protected static Class getGeneratorClass(String name) {
    Class clazz = (Class) generatorClasses.get(name);
    if (clazz != null) {
        return clazz;
    }
    return ClassUtil.forName(name);
}
 
开发者ID:seasarorg,项目名称:s2dao,代码行数:8,代码来源:IdentifierGeneratorFactory.java

示例2: getAdapter

import org.seasar.framework.util.ClassUtil; //导入方法依赖的package包/类
private static Adapter getAdapter() {
    try {
        ClassUtil.forName("org.seasar.framework.env.Env");
    } catch (ClassNotFoundRuntimeException ignore) {
        return new AdapterS23();
    }
    return new AdapterS24();
}
 
开发者ID:seasarorg,项目名称:s2dao,代码行数:9,代码来源:SelectableDataSourceProxyUtil.java

示例3: AdapterS24

import org.seasar.framework.util.ClassUtil; //导入方法依赖的package包/类
private AdapterS24() {
    selectableDataSourceProxyClass = ClassUtil
            .forName("org.seasar.extension.datasource.impl.SelectableDataSourceProxy");
    try {
        dataSourceFactoryField = selectableDataSourceProxyClass
                .getDeclaredField("dataSourceFactory");
    } catch (NoSuchFieldException ex) {
        throw new NoSuchFieldRuntimeException(
                selectableDataSourceProxyClass, "dataSourceFactory", ex);
    }
    dataSourceFactoryField.setAccessible(true);
    getSelectableDataSourceNameMethod = ClassUtil.getMethod(
            dataSourceFactoryField.getType(),
            "getSelectableDataSourceName", null);
}
 
开发者ID:seasarorg,项目名称:s2dao,代码行数:16,代码来源:SelectableDataSourceProxyUtil.java

示例4: init

import org.seasar.framework.util.ClassUtil; //导入方法依赖的package包/类
public void init() {
    Class clazz = ResultSetHandlerFactoryImpl.class;
    try {
        clazz = ClassUtil.forName(TIGER_RESULT_SET_HANDLER_FACTORY);
    } catch (ClassNotFoundRuntimeException ignore) {
    }
    ResultSetHandlerFactoryImpl factory = (ResultSetHandlerFactoryImpl) ClassUtil
            .newInstance(clazz);
    factory.setDtoMetaDataFactory(dtoMetaDataFactory);
    factory.setRestrictNotSingleResult(restrictNotSingleResult);
    resultSetHandlerFactory = factory;
}
 
开发者ID:seasarorg,项目名称:s2dao,代码行数:13,代码来源:ResultSetHandlerFactorySelector.java

示例5: AnnotationReaderFactoryImpl

import org.seasar.framework.util.ClassUtil; //导入方法依赖的package包/类
public AnnotationReaderFactoryImpl() {
    Class clazz = FieldAnnotationReaderFactory.class;
    try {
        clazz = ClassUtil.forName(TIGER_ANNOTATION_READER_FACTORY);
    } catch (ClassNotFoundRuntimeException ignore1) {
        try {
            clazz = ClassUtil
                    .forName(BACKPORT175_ANNOTATION_READER_FACTORY);
        } catch (ClassNotFoundRuntimeException ignore2) {
        }
    }
    annotationReaderFactory = (AnnotationReaderFactory) ClassUtil
            .newInstance(clazz);
}
 
开发者ID:seasarorg,项目名称:s2dao,代码行数:15,代码来源:AnnotationReaderFactoryImpl.java

示例6: AdapterS23

import org.seasar.framework.util.ClassUtil; //导入方法依赖的package包/类
private AdapterS23() {
    selectableDataSourceProxyClass = ClassUtil
            .forName("org.seasar.extension.component.impl.SelectableDataSourceProxy");
    getDataSourceNameMethod = ClassUtil.getMethod(
            selectableDataSourceProxyClass, "getDataSourceName", null);
}
 
开发者ID:seasarorg,项目名称:s2dao,代码行数:7,代码来源:SelectableDataSourceProxyUtil.java


注:本文中的org.seasar.framework.util.ClassUtil.forName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。