Package org.apache.tapestry5.internal.plastic.asm.tree

Examples of org.apache.tapestry5.internal.plastic.asm.tree.ClassNode


        for (Locale l : supportedLocales)
        {
            options.add(new OptionModelImpl(l.getDisplayName(l), l));
        }

        return new SelectModelImpl(null, options);
    }
View Full Code Here


        isVoid = description.returnType.equals("void");

        invocationClassName = String.format("%s$Invocation_%s_%s", plasticClass.className, description.methodName,
                PlasticUtils.nextUID());

        invocationClassNode = new ClassNode();

        invocationClassNode.visit(org.apache.tapestry5.internal.plastic.asm.Opcodes.V1_5, Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, plasticClass.nameCache.toInternalName(invocationClassName),
                null, PlasticClassImpl.ABSTRACT_METHOD_INVOCATION_INTERNAL_NAME, new String[]
                {plasticClass.nameCache.toInternalName(MethodInvocation.class)});
View Full Code Here

    public static ClassNode convertBytecodeToClassNode(byte[] bytecode)
    {
        ClassReader cr = new ClassReader(bytecode);

        ClassNode result = new ClassNode();

        ClassVisitor adapter = new ClassVisitor(Opcodes.ASM4, result)
        {
            @Override
            public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions)
View Full Code Here

        isVoid = description.returnType.equals("void");

        invocationClassName = String.format("%s$Invocation_%s_%s", plasticClass.className, description.methodName,
                PlasticUtils.nextUID());

        invocationClassNode = new ClassNode();

        invocationClassNode.visit(org.apache.tapestry5.internal.plastic.asm.Opcodes.V1_5, Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, plasticClass.nameCache.toInternalName(invocationClassName),
                null, PlasticClassImpl.ABSTRACT_METHOD_INVOCATION_INTERNAL_NAME, new String[]
                {plasticClass.nameCache.toInternalName(MethodInvocation.class)});
View Full Code Here

     * @param pw
     *            write where results going to be printed
     */
    public static void verify(final ClassReader cr, final ClassLoader loader,
            final boolean dump, final PrintWriter pw) {
        ClassNode cn = new ClassNode();
        cr.accept(new CheckClassAdapter(cn, false), ClassReader.SKIP_DEBUG);

        Type syperType = cn.superName == null ? null : Type
                .getObjectType(cn.superName);
        List<MethodNode> methods = cn.methods;
View Full Code Here

        isVoid = description.returnType.equals("void");

        invocationClassName = String.format("%s$Invocation_%s_%s", plasticClass.className, description.methodName,
                PlasticUtils.nextUID());

        invocationClassNode = new ClassNode();

        invocationClassNode.visit(org.apache.tapestry5.internal.plastic.asm.Opcodes.V1_5, Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, plasticClass.nameCache.toInternalName(invocationClassName),
                null, PlasticClassImpl.ABSTRACT_METHOD_INVOCATION_INTERNAL_NAME, new String[]
                {plasticClass.nameCache.toInternalName(MethodInvocation.class)});
View Full Code Here

    public InternalPlasticClassTransformation getPlasticClassTransformation(String className)
            throws ClassNotFoundException
    {
        assert PlasticInternalUtils.isNonBlank(className);

        ClassNode classNode = constructClassNode(className);

        String baseClassName = PlasticInternalUtils.toClassName(classNode.superName);

        return createTransformation(baseClassName, classNode);
    }
View Full Code Here

    public PlasticClassTransformation createTransformation(String baseClassName, String newClassName)
    {
        try
        {
            ClassNode newClassNode = new ClassNode();

            newClassNode.visit(V1_5, ACC_PUBLIC, PlasticInternalUtils.toInternalName(newClassName), null,
                    PlasticInternalUtils.toInternalName(baseClassName), null);

            return createTransformation(baseClassName, newClassNode);
        }
        catch (ClassNotFoundException ex)
View Full Code Here

    public static ClassNode convertBytecodeToClassNode(byte[] bytecode)
    {
        ClassReader cr = new ClassReader(bytecode);

        ClassNode result = new ClassNode();

        cr.accept(result, 0);

        return result;
    }
View Full Code Here

    public PlasticClassHandleShim createShimInstance()
    {
        String shimClassName = String.format("%s$Shim_%s", classNode.name, PlasticUtils.nextUID());

        ClassNode shimClassNode = new ClassNode();

        shimClassNode.visit(V1_5, ACC_PUBLIC | ACC_FINAL, shimClassName, null, HANDLE_SHIM_BASE_CLASS_INTERNAL_NAME,
                null);

        implementConstructor(shimClassNode);

        if (!shimFields.isEmpty())
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.internal.plastic.asm.tree.ClassNode

Copyright © 2018 www.massapicom. 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.