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


Java CannotCreateObjectException类代码示例

本文整理汇总了Java中org.javarosa.core.util.externalizable.CannotCreateObjectException的典型用法代码示例。如果您正苦于以下问题:Java CannotCreateObjectException类的具体用法?Java CannotCreateObjectException怎么用?Java CannotCreateObjectException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


CannotCreateObjectException类属于org.javarosa.core.util.externalizable包,在下文中一共展示了CannotCreateObjectException类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: registerPrototype

import org.javarosa.core.util.externalizable.CannotCreateObjectException; //导入依赖的package包/类
public static void registerPrototype (String className) {
	getPrototypes().addString(className);
	
	try {
		PrototypeFactory.getInstance(Class.forName(className));
	} catch (ClassNotFoundException e) {
		throw new CannotCreateObjectException(className + ": not found");
	}
	rebuild();
}
 
开发者ID:medic,项目名称:javarosa,代码行数:11,代码来源:PrototypeManager.java

示例2: validateDataType

import org.javarosa.core.util.externalizable.CannotCreateObjectException; //导入依赖的package包/类
/**
 * Validate that the record type for this StorageUtility meets all requirements
 *
 * @param type Class object for the type of object this StorageUtility will handle
 */
private void validateDataType (Class type) {
    if (Externalizable.class.isAssignableFrom(type)) {
        try {
            PrototypeFactory.getInstance(type);
        } catch (CannotCreateObjectException ccoe) {
            throw new IllegalArgumentException("Cannot create storage utility. Type [" + type.getName() + "] cannot be used. (" + ccoe.getMessage() + ")");
        }
    } else {
        throw new IllegalArgumentException("Cannot create storage utility. Type [" + type.getName() + "] is not externalizable.");
    }
}
 
开发者ID:dimagi,项目名称:commcare-j2me,代码行数:17,代码来源:RMSStorageUtility.java

示例3: registerPrototype

import org.javarosa.core.util.externalizable.CannotCreateObjectException; //导入依赖的package包/类
public static void registerPrototype(String className) {
    getPrototypes().addString(className);

    try {
        PrototypeFactory.getInstance(Class.forName(className));
    } catch (ClassNotFoundException e) {
        throw new CannotCreateObjectException(className + ": not found");
    }
    rebuild();
}
 
开发者ID:dimagi,项目名称:commcare-j2me,代码行数:11,代码来源:PrototypeManager.java

示例4: registerPrototype

import org.javarosa.core.util.externalizable.CannotCreateObjectException; //导入依赖的package包/类
public static void registerPrototype(String className) {
    prototypes.add(className);

    try {
        PrototypeFactory.getInstance(Class.forName(className));
    } catch (ClassNotFoundException e) {
        throw new CannotCreateObjectException(className + ": not found");
    }
    rebuild();
}
 
开发者ID:dimagi,项目名称:commcare-core,代码行数:11,代码来源:PrototypeManager.java


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