Example usage for org.objectweb.asm.signature SignatureVisitor SignatureVisitor

List of usage examples for org.objectweb.asm.signature SignatureVisitor SignatureVisitor

Introduction

In this page you can find the example usage for org.objectweb.asm.signature SignatureVisitor SignatureVisitor.

Prototype

public SignatureVisitor(final int api) 

Source Link

Document

Constructs a new SignatureVisitor .

Usage

From source file:org.gradle.language.base.internal.tasks.apigen.abi.DefaultApiValidator.java

License:Apache License

protected Set<String> invalidReferencedTypes(String signature) {
    if (signature == null) {
        return Collections.emptySet();
    }//from ww w .  j av a2 s  .c o m
    SignatureReader sr = new SignatureReader(signature);
    final Set<String> result = Sets.newLinkedHashSet();
    sr.accept(new SignatureVisitor(Opcodes.ASM5) {
        @Override
        public void visitClassType(String name) {
            super.visitClassType(name);
            String className = toClassName(name);
            if (!memberOfApiChecker.belongsToApi(className)) {
                result.add(className);
            }
        }
    });
    return result;
}