org.dellroad.jc
Interface ClassfileFinder

All Known Implementing Classes:
JCFinder, SearchpathFinder

public interface ClassfileFinder

Represents objects capable of retrieving class files.


Method Summary
 byte[] getClassfile(String className)
          Retrieve the class file that is used to define the named class.
 long getClassfileHash(String className)
          Return the hash of the bytes that would be returned by getClassfile() with the same arguments.
 

Method Detail

getClassfile

public byte[] getClassfile(String className)
                    throws ClassNotFoundException
Retrieve the class file that is used to define the named class. This is a capability specific to the JC virtual machine.

Parameters:
className - Class name (with slashes, not dots)
Throws:
ClassNotFoundException - if class is not found

getClassfileHash

public long getClassfileHash(String className)
                      throws ClassNotFoundException
Return the hash of the bytes that would be returned by getClassfile() with the same arguments. The hash of a class file is defined as the last 16 bytes of the MD5 of the class file.

Parameters:
className - Class name (with slashes, not dots)
Throws:
ClassNotFoundException - if class is not found