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

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

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

BCClass.getPool介绍

暂无

代码示例

代码示例来源:origin: net.sourceforge.serp/serp

public ConstantPool getPool() {
  return _owner.getPool();
}

代码示例来源:origin: org.apache.openjpa/openjpa-all

public ConstantPool getPool() {
  return _owner.getPool();
}

代码示例来源:origin: net.sourceforge.serp/serp

/**
 * Add an interface to those declared by this class.
 */
public void declareInterface(String name) {
  Integer index = Numbers.valueOf(getPool().findClassEntry(_project.
    getNameCache().getInternalForm(name, false), true));
  List interfaces = _state.getInterfacesHolder();
  if (!interfaces.contains(index))
    interfaces.add(index);
}

代码示例来源:origin: org.apache.openjpa/openjpa-all

/**
 * Add an interface to those declared by this class.
 */
public void declareInterface(String name) {
  Integer index = Numbers.valueOf(getPool().findClassEntry(_project.
    getNameCache().getInternalForm(name, false), true));
  List interfaces = _state.getInterfacesHolder();
  if (!interfaces.contains(index))
    interfaces.add(index);
}

代码示例来源:origin: net.sourceforge.serp/serp

/**
 * Set the superclass of this class.
 */
public void setSuperclass(String name) {
  if (name == null)
    setSuperclassIndex(0);
  else
    setSuperclassIndex(getPool().findClassEntry(_project.getNameCache().
      getInternalForm(name, false), true));
}

代码示例来源:origin: org.apache.openjpa/openjpa-all

/**
 * Set the superclass of this class.
 */
public void setSuperclass(String name) {
  if (name == null)
    setSuperclassIndex(0);
  else
    setSuperclassIndex(getPool().findClassEntry(_project.getNameCache().
      getInternalForm(name, false), true));
}

代码示例来源:origin: org.apache.openjpa/openjpa-all

/**
 * Set the name of this class, including package name.
 */
public void setName(String name) {
  name = _project.getNameCache().getExternalForm(name, false);
  String oldName = getName();
  // get a reference to the class entry for this class
  int index = getIndex();
  if (index == 0)
    index = getPool().findClassEntry(name, true);
  ClassEntry entry = (ClassEntry) getPool().getEntry(index);
  // make sure the rename is ok with the project
  beforeRename(oldName, name);
  // reset the name index of the class entry to the new name
  int nameIndex = getPool().findUTF8Entry(_project.getNameCache().
    getInternalForm(name, false), true);
  entry.setNameIndex(nameIndex);
  // we might have just added a new entry; set the index
  _state.setIndex(index);
}

代码示例来源:origin: net.sourceforge.serp/serp

/**
 * Set the name of this class, including package name.
 */
public void setName(String name) {
  name = _project.getNameCache().getExternalForm(name, false);
  String oldName = getName();
  // get a reference to the class entry for this class
  int index = getIndex();
  if (index == 0)
    index = getPool().findClassEntry(name, true);
  ClassEntry entry = (ClassEntry) getPool().getEntry(index);
  // make sure the rename is ok with the project
  beforeRename(oldName, name);
  // reset the name index of the class entry to the new name
  int nameIndex = getPool().findUTF8Entry(_project.getNameCache().
    getInternalForm(name, false), true);
  entry.setNameIndex(nameIndex);
  // we might have just added a new entry; set the index
  _state.setIndex(index);
}

代码示例来源:origin: org.apache.openjpa/openjpa-all

/**
 * Set the {@link ConstantPool} index of the {@link ClassEntry} for this
 * class. Unlike most other low-level methods, the index
 * will be checked against the pool immediately;
 * classes must have a valid name at all times.
 */
public void setIndex(int index) {
  String oldName = getName();
  String newName = ((ClassEntry) getPool().getEntry(index)).
    getNameEntry().getValue();
  beforeRename(oldName, newName);
  _state.setIndex(index);
}

代码示例来源:origin: net.sourceforge.serp/serp

/**
 * Set the {@link ConstantPool} index of the {@link ClassEntry} for this
 * class. Unlike most other low-level methods, the index
 * will be checked against the pool immediately;
 * classes must have a valid name at all times.
 */
public void setIndex(int index) {
  String oldName = getName();
  String newName = ((ClassEntry) getPool().getEntry(index)).
    getNameEntry().getValue();
  beforeRename(oldName, newName);
  _state.setIndex(index);
}

代码示例来源:origin: org.apache.openjpa/openjpa-all

/**
 * Return the names of the interfaces declared for this class, including
 * package names, or an empty array if none. The names will be in a form
 * suitable for a {@link Class#forName} call.
 */
public String[] getDeclaredInterfaceNames() {
  int[] indexes = getDeclaredInterfaceIndexes();
  String[] names = new String[indexes.length];
  ClassEntry entry;
  for (int i = 0; i < indexes.length; i++) {
    entry = (ClassEntry) getPool().getEntry(indexes[i]);
    names[i] = _project.getNameCache().getExternalForm
      (entry.getNameEntry().getValue(), false);
  }
  return names;
}

代码示例来源:origin: net.sourceforge.serp/serp

/**
 * Return the names of the interfaces declared for this class, including
 * package names, or an empty array if none. The names will be in a form
 * suitable for a {@link Class#forName} call.
 */
public String[] getDeclaredInterfaceNames() {
  int[] indexes = getDeclaredInterfaceIndexes();
  String[] names = new String[indexes.length];
  ClassEntry entry;
  for (int i = 0; i < indexes.length; i++) {
    entry = (ClassEntry) getPool().getEntry(indexes[i]);
    names[i] = _project.getNameCache().getExternalForm
      (entry.getNameEntry().getValue(), false);
  }
  return names;
}

相关文章

微信公众号

最新文章

更多