serp.bytecode.BCClass.isPrimitive()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(83)

本文整理了Java中serp.bytecode.BCClass.isPrimitive()方法的一些代码示例,展示了BCClass.isPrimitive()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。BCClass.isPrimitive()方法的具体详情如下:
包路径:serp.bytecode.BCClass
类名称:BCClass
方法名:isPrimitive

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;
}

相关文章

微信公众号

最新文章

更多