Search in sources :

Example 1 with SignatureReader

use of org.objectweb.asm.signature.SignatureReader in project buck by facebook.

the class ClassReferenceTracker method visitSignature.

private void visitSignature(@Nullable String signature) {
    if (signature == null) {
        return;
    }
    SignatureReader reader = new SignatureReader(signature);
    reader.accept(new TrackingSignatureVisitor(api));
}
Also used : SignatureReader(org.objectweb.asm.signature.SignatureReader)

Example 2 with SignatureReader

use of org.objectweb.asm.signature.SignatureReader in project android_frameworks_base by ParanoidAndroid.

the class RenameClassAdapter method renameFieldSignature.

/**
     * Renames the FieldTypeSignature handled by ClassVisitor.visitField
     * or MethodVisitor.visitLocalVariable.
     */
String renameFieldSignature(String sig) {
    if (sig == null) {
        return null;
    }
    SignatureReader reader = new SignatureReader(sig);
    SignatureWriter writer = new SignatureWriter();
    reader.acceptType(new RenameSignatureAdapter(writer));
    sig = writer.toString();
    return sig;
}
Also used : SignatureReader(org.objectweb.asm.signature.SignatureReader) SignatureWriter(org.objectweb.asm.signature.SignatureWriter)

Example 3 with SignatureReader

use of org.objectweb.asm.signature.SignatureReader in project android_frameworks_base by ResurrectionRemix.

the class AbstractClassAdapter method renameTypeSignature.

/**
     * Renames the ClassSignature handled by ClassVisitor.visit
     * or the MethodTypeSignature handled by ClassVisitor.visitMethod.
     */
String renameTypeSignature(String sig) {
    if (sig == null) {
        return null;
    }
    SignatureReader reader = new SignatureReader(sig);
    SignatureWriter writer = new SignatureWriter();
    reader.accept(new RenameSignatureAdapter(writer));
    sig = writer.toString();
    return sig;
}
Also used : SignatureReader(org.objectweb.asm.signature.SignatureReader) SignatureWriter(org.objectweb.asm.signature.SignatureWriter)

Example 4 with SignatureReader

use of org.objectweb.asm.signature.SignatureReader in project android_frameworks_base by AOSPA.

the class AbstractClassAdapter method renameTypeSignature.

/**
     * Renames the ClassSignature handled by ClassVisitor.visit
     * or the MethodTypeSignature handled by ClassVisitor.visitMethod.
     */
String renameTypeSignature(String sig) {
    if (sig == null) {
        return null;
    }
    SignatureReader reader = new SignatureReader(sig);
    SignatureWriter writer = new SignatureWriter();
    reader.accept(new RenameSignatureAdapter(writer));
    sig = writer.toString();
    return sig;
}
Also used : SignatureReader(org.objectweb.asm.signature.SignatureReader) SignatureWriter(org.objectweb.asm.signature.SignatureWriter)

Example 5 with SignatureReader

use of org.objectweb.asm.signature.SignatureReader in project bytecode-viewer by Konloch.

the class Remapper method mapSignature.

/**
     * 
     * @param typeSignature
     *            true if signature is a FieldTypeSignature, such as the
     *            signature parameter of the ClassVisitor.visitField or
     *            MethodVisitor.visitLocalVariable methods
     */
public String mapSignature(String signature, boolean typeSignature) {
    if (signature == null) {
        return null;
    }
    SignatureReader r = new SignatureReader(signature);
    SignatureWriter w = new SignatureWriter();
    SignatureVisitor a = createRemappingSignatureAdapter(w);
    if (typeSignature) {
        r.acceptType(a);
    } else {
        r.accept(a);
    }
    return w.toString();
}
Also used : SignatureReader(org.objectweb.asm.signature.SignatureReader) SignatureVisitor(org.objectweb.asm.signature.SignatureVisitor) SignatureWriter(org.objectweb.asm.signature.SignatureWriter)

Aggregations

SignatureReader (org.objectweb.asm.signature.SignatureReader)41 SignatureWriter (org.objectweb.asm.signature.SignatureWriter)12 ArrayList (java.util.ArrayList)5 ClassNode (org.codehaus.groovy.ast.ClassNode)4 GenericsType (org.codehaus.groovy.ast.GenericsType)3 Type (org.objectweb.asm.Type)3 SignatureVisitor (org.objectweb.asm.signature.SignatureVisitor)3 BoundDescriptor (com.buschmais.jqassistant.plugin.java.api.model.generics.BoundDescriptor)2 AbstractBoundVisitor (com.buschmais.jqassistant.plugin.java.impl.scanner.visitor.generics.AbstractBoundVisitor)2 List (java.util.List)2 Map (java.util.Map)2 TypeSignatureVisitor (net.sourceforge.pmd.dcd.asm.TypeSignatureVisitor)2 EntryMessage (org.apache.logging.log4j.message.EntryMessage)2 ConstantExpression (org.codehaus.groovy.ast.expr.ConstantExpression)2 ReturnStatement (org.codehaus.groovy.ast.stmt.ReturnStatement)2 DelegatingMethodVisitor (com.buschmais.jqassistant.plugin.java.impl.scanner.visitor.delegate.DelegatingMethodVisitor)1 ClassSignatureVisitor (com.buschmais.jqassistant.plugin.java.impl.scanner.visitor.generics.ClassSignatureVisitor)1 MethodSignatureVisitor (com.buschmais.jqassistant.plugin.java.impl.scanner.visitor.generics.MethodSignatureVisitor)1 IOException (java.io.IOException)1 Constructor (java.lang.reflect.Constructor)1