Examples of EmptyVisitor


Examples of com.google.gwt.dev.asm.commons.EmptyVisitor

   * @return <code>true</code> if the class defined in <code>classBytes</code>
   *         possesses the desired annotation
   */
  public static boolean hasAnnotation(byte[] classBytes,
      Class<? extends Annotation> annotation) {
    HasAnnotation v = new HasAnnotation(new EmptyVisitor(), annotation);
    new ClassReader(classBytes).accept(v, ClassReader.SKIP_CODE
        | ClassReader.SKIP_DEBUG | ClassReader.SKIP_FRAMES);

    return v.isFound();
  }
View Full Code Here

Examples of com.google.gwt.dev.javac.asmbridge.EmptyVisitor

   */
  public static class One extends EmptyVisitor {

    @Override
    public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
      new EmptyVisitor() {
        @Override
        public void visit(int version, int access, String name,
            String signature, String superName, String[] interfaces) {
        }
      };
View Full Code Here

Examples of org.apache.bcel.classfile.EmptyVisitor

      throw new RuntimeException(e);
    }
  }
  public TypeDeclaration parse()
  {
    DescendingVisitor classWalker= new DescendingVisitor(jc, new EmptyVisitor()
    {
      public void visitConstantClass(ConstantClass obj)
      {
        ConstantPool cp= jc.getConstantPool();
        String bytes= obj.getBytes(cp);
View Full Code Here

Examples of org.apache.openejb.asm.commons.EmptyVisitor

                    parameterNames.addAll(Collections.<String>nCopies(method.getParameterTypes().length, null));
                    methodParameters.put(method, parameterNames);
                    isStaticMethod = Modifier.isStatic(method.getModifiers());
                }

                return new EmptyVisitor() {
                    // assume static method until we get a first parameter name
                    public void visitLocalVariable(String name, String description, String signature, Label start, Label end, int index) {
                        if (isStaticMethod) {
                            if (index < parameterNames.size()) {
                                parameterNames.set(index, name);
View Full Code Here

Examples of org.apache.tapestry5.internal.plastic.asm.commons.EmptyVisitor

        return result;
    }

    public Class<?> doClassLoad(String className) throws IOException
    {
        ClassVisitor analyzer = new ClassAdapter(new EmptyVisitor())
        {
            @Override
            public void visit(int version, int access, String name, String signature, String superName, String[] interfaces)
            {
                String path = superName + ".class";
View Full Code Here

Examples of org.apache.xbean.asm.commons.EmptyVisitor

                    parameterNames.addAll(Collections.<String>nCopies(method.getParameterTypes().length, null));
                    methodParameters.put(method, parameterNames);
                    isStaticMethod = Modifier.isStatic(method.getModifiers());
                }

                return new EmptyVisitor() {
                    // assume static method until we get a first parameter name
                    public void visitLocalVariable(String name, String description, String signature, Label start, Label end, int index) {
                        if (isStaticMethod) {
                            if (index < parameterNames.size()) {
                                parameterNames.set(index, name);
View Full Code Here

Examples of org.apache.xbean.asm4.shade.commons.EmptyVisitor

            if ("Ljavax/persistence/PersistenceContext;".equals(desc)) {
                return new PersistenceContextVisitor(className, currentName, contexts);
            } else if ("Ljavax/persistence/PersistenceContexts;".equals(desc)) {
                return super.visitAnnotation(name, desc);
            }
            return new EmptyVisitor().annotationVisitor();
        }
View Full Code Here

Examples of org.apache.xbean.asm5.shade.commons.EmptyVisitor

            if ("Ljavax/persistence/PersistenceContext;".equals(desc)) {
                return new PersistenceContextVisitor(className, currentName, contexts);
            } else if ("Ljavax/persistence/PersistenceContexts;".equals(desc)) {
                return super.visitAnnotation(name, desc);
            }
            return new EmptyVisitor().annotationVisitor();
        }
View Full Code Here

Examples of org.objectweb.asm.commons.EmptyVisitor

    public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
        if ("Lorg/junit/runner/RunWith;".equals(desc)) {
            test = true;
        }

        return new EmptyVisitor();
    }
View Full Code Here

Examples of org.objectweb.asm.commons.EmptyVisitor

     */
    public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
        if (!test) {
            return new JUnitTestMethodDetecter(this);
        } else {
            return new EmptyVisitor();
        }
    }
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.