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

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

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

BCClass.getClassLoader介绍

暂无

代码示例

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

/**
 * Initialize from the given parsed bytecode.
 * For use by the owning project only.
 */
void read(BCClass orig) {
  try {
    ByteArrayInputStream in = new ByteArrayInputStream
      (orig.toByteArray());
    read(in, orig.getClassLoader());
    in.close();
  } catch (IOException ioe) {
    throw new RuntimeException(ioe.toString());
  }
}

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

/**
 * Return the {@link Class} object for the superclass of this class, if it
 * is loadable. Returns null for types without superclasses.
 */
public Class getSuperclassType() {
  String name = getSuperclassName();
  if (name == null)
    return null;
  return Strings.toClass(name, getClassLoader());
}

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

/**
 * Return the {@link Class} objects for the declared interfaces of this
 * class, or an empty array if none.
 */
public Class[] getDeclaredInterfaceTypes() {
  String[] names = getDeclaredInterfaceNames();
  Class[] types = new Class[names.length];
  for (int i = 0; i < names.length; i++)
    types[i] = Strings.toClass(names[i], getClassLoader());
  return types;
}

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

/**
 * Return the {@link Class} object for this class, if it is loadable.
 */
public Class getType() {
  return Strings.toClass(getName(), getClassLoader());
}

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

/**
 * Return the {@link Class} objects for the declared interfaces of this
 * class, or an empty array if none.
 */
public Class[] getDeclaredInterfaceTypes() {
  String[] names = getDeclaredInterfaceNames();
  Class[] types = new Class[names.length];
  for (int i = 0; i < names.length; i++)
    types[i] = Strings.toClass(names[i], getClassLoader());
  return types;
}

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

/**
 * Return the {@link Class} object for the superclass of this class, if it
 * is loadable. Returns null for types without superclasses.
 */
public Class getSuperclassType() {
  String name = getSuperclassName();
  if (name == null)
    return null;
  return Strings.toClass(name, getClassLoader());
}

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

/**
 * Return the {@link Class} object for this class, if it is loadable.
 */
public Class getType() {
  return Strings.toClass(getName(), getClassLoader());
}

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

/**
 * Return the component type of this class, or null if not an array.
 */
public Class getComponentType() {
  String componentName = getComponentName();
  if (componentName == null)
    return null;
  return Strings.toClass(componentName, getClassLoader());
}

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

/**
 * Return the component type of this class, or null if not an array.
 */
public Class getComponentType() {
  String componentName = getComponentName();
  if (componentName == null)
    return null;
  return Strings.toClass(componentName, getClassLoader());
}

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

private static byte[] toJava7ByteArray(BCClass bc, byte[] classBytes) throws IOException {
  ByteArrayInputStream bais = new ByteArrayInputStream(classBytes);
  BufferedInputStream bis = new BufferedInputStream(bais);
  ClassWriter cw = new BCClassWriter(ClassWriter.COMPUTE_FRAMES, bc.getClassLoader());
  ClassReader cr = new ClassReader(bis);
  cr.accept(cw, 0);
  return cw.toByteArray();
}

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

private static byte[] toJava7ByteArray(BCClass bc, byte[] classBytes) throws IOException {
  ByteArrayInputStream bais = new ByteArrayInputStream(classBytes);
  BufferedInputStream bis = new BufferedInputStream(bais);
  ClassWriter cw = new BCClassWriter(ClassWriter.COMPUTE_FRAMES, bc.getClassLoader());
  ClassReader cr = new ClassReader(bis);
  cr.accept(cw, 0);
  return cw.toByteArray();
}

代码示例来源:origin: org.apache.openejb.patch/openjpa-kernel

private static byte[] toJava7ByteArray(BCClass bc, byte[] classBytes) throws IOException {
  ByteArrayInputStream bais = new ByteArrayInputStream(classBytes);
  BufferedInputStream bis = new BufferedInputStream(bais);
  ClassWriter cw = new BCClassWriter(ClassWriter.COMPUTE_FRAMES, bc.getClassLoader());
  ClassReader cr = new ClassReader(bis);
  cr.accept(cw, 0);
  return cw.toByteArray();
}

代码示例来源:origin: org.apache.openejb.patch/openjpa

private static byte[] toJava7ByteArray(BCClass bc, byte[] classBytes) throws IOException {
  ByteArrayInputStream bais = new ByteArrayInputStream(classBytes);
  BufferedInputStream bis = new BufferedInputStream(bais);
  ClassWriter cw = new BCClassWriter(ClassWriter.COMPUTE_FRAMES, bc.getClassLoader());
  ClassReader cr = new ClassReader(bis);
  cr.accept(cw, 0);
  return cw.toByteArray();
}

代码示例来源:origin: org.apache.openejb.patch/openjpa-asm-shaded

private static byte[] toJava7ByteArray(BCClass bc, byte[] classBytes) throws IOException {
  ByteArrayInputStream bais = new ByteArrayInputStream(classBytes);
  BufferedInputStream bis = new BufferedInputStream(bais);
  ClassWriter cw = new BCClassWriter(ClassWriter.COMPUTE_FRAMES, bc.getClassLoader());
  ClassReader cr = new ClassReader(bis);
  cr.accept(cw, 0);
  return cw.toByteArray();
}

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

/**
 * Return the bytecode of the superclass of this class, or
 * null for types without superclasses.
 */
public BCClass getSuperclassBC() {
  String name = getSuperclassName();
  if (name == null)
    return null;
  return getProject().loadClass(name, getClassLoader());
}

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

/**
 * Return the component type of this class, or null if not an array.
 */
public BCClass getComponentBC() {
  String componentName = getComponentName();
  if (componentName == null)
    return null;
  return getProject().loadClass(componentName, getClassLoader());
}

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

/**
 * Return the component type of this class, or null if not an array.
 */
public BCClass getComponentBC() {
  String componentName = getComponentName();
  if (componentName == null)
    return null;
  return getProject().loadClass(componentName, getClassLoader());
}

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

/**
 * Return the bytecode for the declared interfaces of this class, or an
 * empty array if none.
 */
public BCClass[] getDeclaredInterfaceBCs() {
  String[] names = getDeclaredInterfaceNames();
  BCClass[] types = new BCClass[names.length];
  for (int i = 0; i < names.length; i++)
    types[i] = getProject().loadClass(names[i], getClassLoader());
  return types;
}

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

/**
 * Return the bytecode of the superclass of this class, or
 * null for types without superclasses.
 */
public BCClass getSuperclassBC() {
  String name = getSuperclassName();
  if (name == null)
    return null;
  return getProject().loadClass(name, getClassLoader());
}

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

/**
 * Return the bytecode for the declared interfaces of this class, or an
 * empty array if none.
 */
public BCClass[] getDeclaredInterfaceBCs() {
  String[] names = getDeclaredInterfaceNames();
  BCClass[] types = new BCClass[names.length];
  for (int i = 0; i < names.length; i++)
    types[i] = getProject().loadClass(names[i], getClassLoader());
  return types;
}

相关文章

微信公众号

最新文章

更多