Package org.apache.xbean.asm5.signature

Examples of org.apache.xbean.asm5.signature.SignatureReader


   * Creates method signature from method name.
   */
  protected MethodSignatureVisitor createMethodSignature(int access, String methodName, String description, String signature, String classname) {
    MethodSignatureVisitor v = new MethodSignatureVisitor(methodName, access, classname, description, signature, this);
    v.hierarchyLevel = this.hierarchyLevel;
    new SignatureReader(signature != null ? signature : description).accept(v);
    return v;
  }
View Full Code Here


   * Creates method signature from method name.
   */
  protected MethodSignatureVisitor createMethodSignature(int access, String methodName, String description, String signature, String classname) {
    MethodSignatureVisitor v = new MethodSignatureVisitor(methodName, access, classname, description, signature, this);
    v.hierarchyLevel = this.hierarchyLevel;
    new SignatureReader(signature != null ? signature : description).accept(v);
    return v;
  }
View Full Code Here

    assertEquals("(java.util.List<? super java.lang.Integer>)", resolveSignature(mps[2].getSignature()));
  }


  private String resolveSignature(String signature) {
    SignatureReader signatureReader = new SignatureReader("(" + signature + ")V");
    StringBuilder sb = new StringBuilder();
    signatureReader.accept(new TraceSignatureVisitor(sb, true));
    return sb.toString();
  }
View Full Code Here

        }
    }

    private void addSignature(final String signature) {
        if (signature != null) {
            new SignatureReader(signature).accept(new SignatureAdapter(this));
        }
    }
View Full Code Here

        }
    }

    private void addTypeSignature(final String signature) {
        if (signature != null) {
            new SignatureReader(signature).acceptType(new SignatureAdapter(this));
        }
    }
View Full Code Here

        }
    }

    private void addSignature(final String signature) {
        if (signature != null) {
            new SignatureReader(signature).accept(new SignatureAdapter(this));
        }
    }
View Full Code Here

        }
    }

    private void addTypeSignature(final String signature) {
        if (signature != null) {
            new SignatureReader(signature).acceptType(new SignatureAdapter(this));
        }
    }
View Full Code Here

    private static byte[] toJava7ByteArray(BCClass bc, byte[] classBytes) throws IOException {
        ByteArrayInputStream bais = new ByteArrayInputStream(classBytes);
        BufferedInputStream bis = new BufferedInputStream(bais);

        ClassWriter cw = new BCClassWriter(ClassWriter.COMPUTE_FRAMES, bc.getClassLoader());
        ClassReader cr = new ClassReader(bis);
        cr.accept(cw, 0);
        return cw.toByteArray();
    }
View Full Code Here

    private static void file(final File file, final KeysAnnotationVisitor visitor) {
        try {
            final InputStream in = IO.read(file);
            try {
                final ClassReader classReader = new ClassReader(in);
                classReader.accept(visitor, ClassWriter.COMPUTE_FRAMES);
            } finally {
                IO.close(in);
            }
        } catch (final IOException e) {
            e.printStackTrace();
View Full Code Here

            final URL resource = classLoader.getResource(className);
            if (resource != null) {
                InputStream in = resource.openStream();
                in = new BufferedInputStream(in);
                try {
                    final ClassReader classReader = new ClassReader(in);
                    classReader.accept(visitor, ASM_FLAGS);
                } finally {
                    in.close();
                }
            } else {
                new Exception("Could not load " + className).printStackTrace();
View Full Code Here

TOP

Related Classes of org.apache.xbean.asm5.signature.SignatureReader

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.