Search in sources :

Example 1 with SerialVersionClassVisitor

use of org.apache.aries.versioning.utils.SerialVersionClassVisitor in project aries by apache.

the class BundleCompatibility method getVisitor.

private SemanticVersioningClassVisitor getVisitor(IFile file, URLClassLoader loader) {
    SerialVersionClassVisitor sv = new SerialVersionClassVisitor(null);
    SemanticVersioningClassVisitor oldcv = new SemanticVersioningClassVisitor(loader, sv);
    try {
        ClassReader cr = new ClassReader(file.open());
        cr.accept(oldcv, 0);
    } catch (IOException ioe) {
        _logger.debug("The file " + file + "cannot be opened.");
    }
    return oldcv;
}
Also used : SerialVersionClassVisitor(org.apache.aries.versioning.utils.SerialVersionClassVisitor) ClassReader(org.objectweb.asm.ClassReader) IOException(java.io.IOException) SemanticVersioningClassVisitor(org.apache.aries.versioning.utils.SemanticVersioningClassVisitor)

Aggregations

IOException (java.io.IOException)1 SemanticVersioningClassVisitor (org.apache.aries.versioning.utils.SemanticVersioningClassVisitor)1 SerialVersionClassVisitor (org.apache.aries.versioning.utils.SerialVersionClassVisitor)1 ClassReader (org.objectweb.asm.ClassReader)1