Package org.ow2.asm

Examples of org.ow2.asm.ClassWriter.toByteArray()


        buildExtensionMethods( cw, name, core );

        cw.visitEnd();

        return cw.toByteArray();
    }



View Full Code Here


        buildExtendedMethods( cw, getTrait(), core, mask );


        cw.visitEnd();

        return cw.toByteArray();

    }

    private boolean hasImpl( Trait annTrait ) {
        return annTrait != null && ! annTrait.impl().equals( Trait.NullMixin.class );
View Full Code Here

            cw.visitEnd();
        } catch ( Exception e ) {
            e.printStackTrace();
        }

        return cw.toByteArray();
    }

    protected void init( ClassDefinition classDef ) {

    }
View Full Code Here

        buildExtendedMethods( cw, trait, core, mask );

        cw.visitEnd();

        return cw.toByteArray();

    }

    private <K extends Annotation> K getAnnotation( Class klass, Class<K> annotationClass ) {
        if ( klass.equals( Thing.class ) ) {
View Full Code Here

        buildCommonMethods( cw, name );


        cw.visitEnd();

        return cw.toByteArray();
    }



View Full Code Here

                        getterMethod,
                        cw );

        cw.visitEnd();

        return cw.toByteArray();
    }

    private byte[] dumpWriter(final Class< ? > originalClass,
                              final String className,
                              final Method getterMethod,
View Full Code Here

                        fieldType,
                        cw );

        cw.visitEnd();

        return cw.toByteArray();
    }

    /**
     * Builds the class header
     * 
View Full Code Here

            mv.visitEnd();
        }

        cw.visitEnd();

        return cw.toByteArray();
    }


    protected void initializeDynamicTypeStructures( MethodVisitor mv, String wrapperName, ClassDefinition coreDef ) {
        if ( coreDef.isFullTraiting() ) {
View Full Code Here

            }
            if (staticInitializer != null) {
                staticInitializer.write(this, cw);
            }
            cw.visitEnd();
            bytecode = cw.toByteArray();
            if (DUMP_GENERATED_CLASSES) {
                dumpGeneratedClass(bytecode);
            }
        }
        return bytecode;
View Full Code Here

            cw.visitEnd();
        } catch ( Exception e ) {
            e.printStackTrace();
        }

        return cw.toByteArray();
    }

    protected void init( ClassDefinition classDef ) {

    }
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.