Package serp.bytecode

Examples of serp.bytecode.BCClass.toByteArray()


        } catch (Throwable t) {
            throw new InternalException(_loc.get("interface-load", iface,
                loader), t).setFatal(true);
        }
        // copy the BCClass into the enhancer project.
        bc = _enhProject.loadClass(new ByteArrayInputStream(bc.toByteArray()),
            loader);
        PCEnhancer enhancer = new PCEnhancer(_repos.getConfiguration(), bc,
            meta);

        int result = enhancer.run();
View Full Code Here


                (_flags.enforcePropertyRestrictions);

            if (enhancer.run() == PCEnhancer.ENHANCE_NONE)
                return null;
            BCClass pcb = enhancer.getPCBytecode();
            returnBytes = AsmAdaptor.toByteArray(pcb, pcb.toByteArray());
            return returnBytes;
        } catch (Throwable t) {
            _log.warn(_loc.get("cft-exception-thrown", className), t);
            if (t instanceof RuntimeException)
                throw (RuntimeException) t;
View Full Code Here

        } catch (Throwable t) {
            throw new InternalException(_loc.get("interface-load", iface,
                loader), t).setFatal(true);
        }
        // copy the BCClass<?> into the enhancer project.
        bc = _enhProject.loadClass(new ByteArrayInputStream(bc.toByteArray()),
            loader);
        PCEnhancer enhancer = new PCEnhancer(_repos, bc, meta);

        int result = enhancer.run();
        if (result != PCEnhancer.ENHANCE_PC)
View Full Code Here

        } catch (Throwable t) {
            throw new InternalException(_loc.get("interface-load", iface,
                loader), t).setFatal(true);
        }
        // copy the BCClass into the enhancer project.
        bc = _enhProject.loadClass(new ByteArrayInputStream(bc.toByteArray()),
            loader);
        PCEnhancer enhancer = new PCEnhancer(_repos, bc, meta);

        int result = enhancer.run();
        if (result != PCEnhancer.ENHANCE_PC)
View Full Code Here

                            enhancer.setAddDefaultConstructor(true);
                            enhancer.setEnforcePropertyRestrictions(true);

                            if (enhancer.run() != PCEnhancer.ENHANCE_NONE) {
                                final BCClass pcb = enhancer.getPCBytecode();
                                final byte[] transformed = AsmAdaptor.toByteArray(pcb, pcb.toByteArray());
                                if (transformed != null) {
                                    buffer = transformed;
                                }
                            }
                        }
View Full Code Here

        } catch (Throwable t) {
            throw new InternalException(_loc.get("interface-load", iface,
                loader), t).setFatal(true);
        }
        // copy the BCClass into the enhancer project.
        bc = _enhProject.loadClass(new ByteArrayInputStream(bc.toByteArray()),
            loader);
        PCEnhancer enhancer = new PCEnhancer(_repos, bc, meta);

        int result = enhancer.run();
        if (result != PCEnhancer.ENHANCE_PC)
View Full Code Here

                (_flags.enforcePropertyRestrictions);

            if (enhancer.run() == PCEnhancer.ENHANCE_NONE)
                return null;
            BCClass pcb = enhancer.getPCBytecode();
            returnBytes = AsmAdaptor.toByteArray(pcb, pcb.toByteArray());
            return returnBytes;
        } catch (Throwable t) {
            _log.warn(_loc.get("cft-exception-thrown", className), t);
            if (t instanceof RuntimeException)
                throw (RuntimeException) t;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.