Examples of visitMethod()


Examples of org.apache.tapestry5.internal.plastic.asm.ClassWriter.visitMethod()

    {
        ClassWriter cw = helper.createWriter(SYNTH_COMPONENT_CLASSNAME, BASIC_COMPONENT_CLASSNAME, Named.class.getName());

        helper.implementPublicConstructor(cw, BASIC_COMPONENT_CLASSNAME);

        MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "getName", "()Ljava/lang/String;", null, null);
        mv.visitCode();
        mv.visitLdcInsn(name);
        mv.visitInsn(ARETURN);
        mv.visitEnd();
View Full Code Here

Examples of org.apache.tuscany.sca.implementation.java.introspect.JavaClassVisitor.visitMethod()

    public void testWalk() throws Exception {
        JavaImplementationFactory factory = new DefaultJavaImplementationFactory();
        JavaClassVisitor extension = EasyMock.createMock(JavaClassVisitor.class);
        extension.visitClass(EasyMock.eq(Bar.class), EasyMock.isA(JavaImplementation.class));
        extension.visitConstructor(EasyMock.isA(Constructor.class), EasyMock.isA(JavaImplementation.class));
        extension.visitMethod(EasyMock.isA(Method.class), EasyMock.isA(JavaImplementation.class));
        extension.visitField(EasyMock.isA(Field.class), EasyMock.isA(JavaImplementation.class));
        extension.visitSuperClass(EasyMock.isA(Class.class), EasyMock.isA(JavaImplementation.class));
        extension.visitEnd(EasyMock.isA(Class.class), EasyMock.isA(JavaImplementation.class));

        // mock.expects(once()).method("visitClass");
View Full Code Here

Examples of org.apache.tuscany.spi.implementation.java.ImplementationProcessor.visitMethod()

            EasyMock.isA(DeploymentContext.class));
        processor.visitConstructor(EasyMock.isA(CompositeComponent.class),
            EasyMock.isA(Constructor.class),
            EasyMock.isA(PojoComponentType.class),
            EasyMock.isA(DeploymentContext.class));
        processor.visitMethod(EasyMock.isA(CompositeComponent.class),
            EasyMock.isA(Method.class),
            EasyMock.isA(PojoComponentType.class),
            EasyMock.isA(DeploymentContext.class));
        processor.visitField(EasyMock.isA(CompositeComponent.class),
            EasyMock.isA(Field.class),
View Full Code Here

Examples of org.apache.xbean.asm.ClassWriter.visitMethod()

    fv.visitEnd();
    fv = cw.visitField(ACC_FINAL + ACC_PRIVATE, NON_BUSINESS_HANDLER_NAME, "Ljava/lang/reflect/InvocationHandler;", null, null);
    fv.visitEnd();
   
    // push single argument constructor
    mv = cw.visitMethod(ACC_PUBLIC, "<init>", "(Ljava/lang/reflect/InvocationHandler;)V", null, null);
    mv.visitCode();
    mv.visitVarInsn(ALOAD, 0);
    mv.visitVarInsn(ALOAD, 1);
    mv.visitVarInsn(ALOAD, 1);
    mv.visitMethodInsn(INVOKESPECIAL, proxyName, "<init>", "(Ljava/lang/reflect/InvocationHandler;Ljava/lang/reflect/InvocationHandler;)V");
View Full Code Here

Examples of org.apache.xbean.asm4.ClassWriter.visitMethod()

        MethodVisitor mv;

        cw.visit(V1_6, ACC_PUBLIC + ACC_SUPER, "org/apache/openejb/hibernate/OpenEJBJtaPlatform", null, "org/hibernate/service/jta/platform/internal/AbstractJtaPlatform", null);

        {
            mv = cw.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null);
            mv.visitCode();
            mv.visitVarInsn(ALOAD, 0);
            mv.visitMethodInsn(INVOKESPECIAL, "org/hibernate/service/jta/platform/internal/AbstractJtaPlatform", "<init>", "()V");
            mv.visitInsn(RETURN);
            mv.visitMaxs(1, 1);
View Full Code Here

Examples of org.apache.xbean.asm5.ClassWriter.visitMethod()

        MethodVisitor mv;

        cw.visit(V1_6, ACC_PUBLIC + ACC_SUPER, target.replace('.', '/'), null, abstractJtaPlatformPackage + "/AbstractJtaPlatform", null);

        {
            mv = cw.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null);
            mv.visitCode();
            mv.visitVarInsn(ALOAD, 0);
            mv.visitMethodInsn(INVOKESPECIAL, abstractJtaPlatformPackage + "/AbstractJtaPlatform", "<init>", "()V", false);
            mv.visitInsn(RETURN);
            mv.visitMaxs(1, 1);
View Full Code Here

Examples of org.codehaus.groovy.ast.ClassCodeExpressionTransformer.visitMethod()

                newParams[0] = p;
                parameter.set(p);
                System.arraycopy(origParams, 0, newParams, 1, origParams.length);
                method.setParameters(newParams);

                expressionTransformer.visitMethod(method);
            }
        }
        new VariableScopeVisitor(source, true).visitClass(parent);
    }
View Full Code Here

Examples of org.codehaus.groovy.classgen.VariableScopeVisitor.visitMethod()

        VariableScopeVisitor scopeVisitor = new VariableScopeVisitor(source);
        if(methodNode == null) {
            scopeVisitor.visitClass(classNode);
        } else {
            scopeVisitor.prepareVisit(classNode);
            scopeVisitor.visitMethod(methodNode);
        }
    }
   
    public static boolean isSetterOrGetterMethod(MethodNode md) {
        String methodName = md.getName();
View Full Code Here

Examples of org.codehaus.groovy.transform.sc.transformers.StaticCompilationTransformer.visitMethod()

            visitor.performSecondPass();
        }
        if (node instanceof ClassNode) {
            transformer.visitClass((ClassNode) node);
        } else if (node instanceof MethodNode) {
            transformer.visitMethod((MethodNode) node);
        }
    }

    @Override
    protected StaticTypeCheckingVisitor newVisitor(final SourceUnit unit, final ClassNode node) {
View Full Code Here

Examples of org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitMethod()

            visitor = newVisitor(source, methodNode.getDeclaringClass());
            visitor.setCompilationUnit(compilationUnit);
            addTypeCheckingExtensions(visitor, extensions);
            visitor.setMethodsToBeVisited(Collections.singleton(methodNode));
            visitor.initialize();
            visitor.visitMethod(methodNode);
        } else {
            source.addError(new SyntaxException(STATIC_ERROR_PREFIX + "Unimplemented node type",
                    node.getLineNumber(), node.getColumnNumber(), node.getLastLineNumber(), node.getLastColumnNumber()));
        }
        if (visitor != null) {
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.