classloader - Uniquely identify a Java class implementation -
i have been dealing poorly branched projects left me dependiencies include several classes exact same qualified name. consequently, have been getting abstractmethoderror
calling methods on wrong implementations. solution rename class packages worked fine.
however, wonder whether there better way - can uniquely identify java class implementation?
you can check if 2 classes (or classes of 2 objects) identical:
o1.getclass() == o2.getclass()
this expression true
when classes identical (i.e. loaded same class loader).
afaik there no way determine if class @ runtime got created specific file.
Comments
Post a Comment