本文整理了Java中serp.bytecode.BCClass.isPrimitive()
方法的一些代码示例,展示了BCClass.isPrimitive()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。BCClass.isPrimitive()
方法的具体详情如下:
包路径:serp.bytecode.BCClass
类名称:BCClass
方法名:isPrimitive
[英]Return true if this class is a primitive type.
[中]如果此类是基元类型,则返回true。
代码示例来源:origin: net.sourceforge.serp/serp
/**
* Import the given bytecode from another project. If a {@link BCClass}
* with the same name already exists in this project, it will be returned.
* Otherwise, a new {@link BCClass} will be created from the
* information in the given class.
*/
public BCClass loadClass(BCClass bc) {
String name = bc.getName();
BCClass cached = checkCache(name);
if (cached != null)
return cached;
BCClass ret = new BCClass(this);
if (bc.isPrimitive())
ret.setState(new PrimitiveState(bc.getType(), _names));
else if (bc.isArray())
ret.setState(new ArrayState(bc.getName(), bc.getComponentName()));
else {
ret.setState(new ObjectState(_names));
ret.read(bc);
}
cache(name, ret);
return ret;
}
代码示例来源:origin: org.apache.openjpa/openjpa-all
/**
* Import the given bytecode from another project. If a {@link BCClass}
* with the same name already exists in this project, it will be returned.
* Otherwise, a new {@link BCClass} will be created from the
* information in the given class.
*/
public BCClass loadClass(BCClass bc) {
String name = bc.getName();
BCClass cached = checkCache(name);
if (cached != null)
return cached;
BCClass ret = new BCClass(this);
if (bc.isPrimitive())
ret.setState(new PrimitiveState(bc.getType(), _names));
else if (bc.isArray())
ret.setState(new ArrayState(bc.getName(), bc.getComponentName()));
else {
ret.setState(new ObjectState(_names));
ret.read(bc);
}
cache(name, ret);
return ret;
}
内容来源于网络,如有侵权,请联系作者删除!