private static void writeJava7(BCClass bc, OutputStream out) throws IOException { byte[] java7Bytes = toJava7ByteArray(bc, bc.toByteArray()); out.write(java7Bytes); }
private static void writeJava7(BCClass bc, OutputStream out) throws IOException { byte[] java7Bytes = toJava7ByteArray(bc, bc.toByteArray()); out.write(java7Bytes); }
private static void writeJava7(BCClass bc, OutputStream out) throws IOException { byte[] java7Bytes = toJava7ByteArray(bc, bc.toByteArray()); out.write(java7Bytes); }
private static void writeJava7(BCClass bc, OutputStream out) throws IOException { byte[] java7Bytes = toJava7ByteArray(bc, bc.toByteArray()); out.write(java7Bytes); }
private static void writeJava7(BCClass bc, OutputStream out) throws IOException { byte[] java7Bytes = toJava7ByteArray(bc, bc.toByteArray()); out.write(java7Bytes); }
/** * 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()); } }
/** * 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()); } }
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); }
private static void write(BCClass bc, PCEnhancer enhancer, Map<Class, byte[]> map, Class cls, List subs, List ints) throws IOException { if (bc == enhancer.getManagedTypeBytecode()) { // if it was already defined, don't put it in the map, // but do set the metadata accordingly. if (enhancer.isAlreadyRedefined()) ints.add(bc.getType()); else if (JavaVersions.VERSION >= 5) map.put(bc.getType(), bc.toByteArray()); } else { if (!enhancer.isAlreadySubclassed()) { // this is the new subclass ClassLoader loader = GeneratedClasses.getMostDerivedLoader( cls, PersistenceCapable.class); subs.add(GeneratedClasses.loadBCClass(bc, loader)); } } }
private static void write(BCClass bc, PCEnhancer enhancer, Map<Class, byte[]> map, Class cls, List subs, List ints) throws IOException { if (bc == enhancer.getManagedTypeBytecode()) { // if it was already defined, don't put it in the map, // but do set the metadata accordingly. if (enhancer.isAlreadyRedefined()) ints.add(bc.getType()); else if (JavaVersions.VERSION >= 5) map.put(bc.getType(), bc.toByteArray()); } else { if (!enhancer.isAlreadySubclassed()) { // this is the new subclass ClassLoader loader = GeneratedClasses.getMostDerivedLoader( cls, PersistenceCapable.class); subs.add(GeneratedClasses.loadBCClass(bc, loader)); } } }
private static void write(BCClass bc, PCEnhancer enhancer, Map<Class<?>, byte[]> map, Class<?> cls, List<Class<?>> subs, List<Class<?>> ints) throws IOException { if (bc == enhancer.getManagedTypeBytecode()) { // if it was already defined, don't put it in the map, // but do set the metadata accordingly. if (enhancer.isAlreadyRedefined()) ints.add(bc.getType()); else { map.put(bc.getType(), bc.toByteArray()); debugBytecodes(bc); } } else { if (!enhancer.isAlreadySubclassed()) { debugBytecodes(bc); // this is the new subclass ClassLoader loader = GeneratedClasses.getMostDerivedLoader( cls, PersistenceCapable.class); subs.add(GeneratedClasses.loadBCClass(bc, loader)); } } }
private static void write(BCClass bc, PCEnhancer enhancer, Map<Class<?>, byte[]> map, Class<?> cls, List<Class<?>> subs, List<Class<?>> ints) throws IOException { if (bc == enhancer.getManagedTypeBytecode()) { // if it was already defined, don't put it in the map, // but do set the metadata accordingly. if (enhancer.isAlreadyRedefined()) ints.add(bc.getType()); else { map.put(bc.getType(), bc.toByteArray()); debugBytecodes(bc); } } else { if (!enhancer.isAlreadySubclassed()) { debugBytecodes(bc); // this is the new subclass ClassLoader loader = GeneratedClasses.getMostDerivedLoader( cls, PersistenceCapable.class); subs.add(GeneratedClasses.loadBCClass(bc, loader)); } } }
private static void write(BCClass bc, PCEnhancer enhancer, Map<Class<?>, byte[]> map, Class<?> cls, List<Class<?>> subs, List<Class<?>> ints) throws IOException { if (bc == enhancer.getManagedTypeBytecode()) { // if it was already defined, don't put it in the map, // but do set the metadata accordingly. if (enhancer.isAlreadyRedefined()) ints.add(bc.getType()); else { map.put(bc.getType(), bc.toByteArray()); debugBytecodes(bc); } } else { if (!enhancer.isAlreadySubclassed()) { debugBytecodes(bc); // this is the new subclass ClassLoader loader = GeneratedClasses.getMostDerivedLoader( cls, PersistenceCapable.class); subs.add(GeneratedClasses.loadBCClass(bc, loader)); } } }
private static void write(BCClass bc, PCEnhancer enhancer, Map<Class<?>, byte[]> map, Class<?> cls, List<Class<?>> subs, List<Class<?>> ints) throws IOException { if (bc == enhancer.getManagedTypeBytecode()) { // if it was already defined, don't put it in the map, // but do set the metadata accordingly. if (enhancer.isAlreadyRedefined()) ints.add(bc.getType()); else { map.put(bc.getType(), bc.toByteArray()); debugBytecodes(bc); } } else { if (!enhancer.isAlreadySubclassed()) { debugBytecodes(bc); // this is the new subclass ClassLoader loader = GeneratedClasses.getMostDerivedLoader( cls, PersistenceCapable.class); subs.add(GeneratedClasses.loadBCClass(bc, loader)); } } }
private static void write(BCClass bc, PCEnhancer enhancer, Map<Class, byte[]> map, Class cls, List subs, List ints) throws IOException { if (bc == enhancer.getManagedTypeBytecode()) { // if it was already defined, don't put it in the map, // but do set the metadata accordingly. if (enhancer.isAlreadyRedefined()) ints.add(bc.getType()); else if (JavaVersions.VERSION >= 5) { map.put(bc.getType(), bc.toByteArray()); debugBytecodes(bc); } } else { if (!enhancer.isAlreadySubclassed()) { debugBytecodes(bc); // this is the new subclass ClassLoader loader = GeneratedClasses.getMostDerivedLoader( cls, PersistenceCapable.class); subs.add(GeneratedClasses.loadBCClass(bc, loader)); } } }
return enhancer.getPCBytecode().toByteArray(); } catch (Throwable t) { _log.warn(_loc.get("cft-exception-thrown", className), t);
return enhancer.getPCBytecode().toByteArray(); } catch (Throwable t) { _log.warn(_loc.get("cft-exception-thrown", className), t);
return enhancer.getPCBytecode().toByteArray(); } catch (Throwable t) { _log.warn(_loc.get("cft-exception-thrown", className), t);
return null; BCClass pcb = enhancer.getPCBytecode(); returnBytes = AsmAdaptor.toByteArray(pcb, pcb.toByteArray()); return returnBytes; } catch (Throwable t) {