/** * Return true if the project already contains the given class. */ public boolean containsClass(Class type) { return (type == null) ? false : containsClass(type.getName()); }
/** * Return true if the project already contains the given class. */ public boolean containsClass(Class type) { return (type == null) ? false : containsClass(type.getName()); }
/** * Return true if the project already contains the given class. */ public boolean containsClass(BCClass type) { return (type == null) ? false : containsClass(type.getName()); }
/** * Return true if the project already contains the given class. */ public boolean containsClass(BCClass type) { return (type == null) ? false : containsClass(type.getName()); }
protected Class findClass(String name) throws ClassNotFoundException { byte[] bytes; try { BCClass type; if (!_project.containsClass(name)) type = createClass(name); else type = _project.loadClass(name); if (type == null) throw new ClassNotFoundException(name); bytes = type.toByteArray(); } catch (RuntimeException re) { throw new ClassNotFoundException(re.toString()); } return defineClass(name, bytes, 0, bytes.length); }
protected Class findClass(String name) throws ClassNotFoundException { byte[] bytes; try { BCClass type; if (!_project.containsClass(name)) type = createClass(name); else type = _project.loadClass(name); if (type == null) throw new ClassNotFoundException(name); bytes = type.toByteArray(); } catch (RuntimeException re) { throw new ClassNotFoundException(re.toString()); } return defineClass(name, bytes, 0, bytes.length); }