public class ClassFileSource extends Support
| Constructor and Description |
|---|
ClassFileSource(String className,
File classFile)
Constructor
|
ClassFileSource(String className,
InputStream byteCodeStream)
Constructor
|
ClassFileSource(String className,
ZipFile zipFile)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
DataInputStream |
classFileContents()
Get a DataInputStream containing the class file.
|
File |
computeDestination(File destDir)
Compute the destination file for the class.
|
String |
containingFilePath()
Get the path of the File containing the class
|
String |
expectedClassName()
The expected name of the class contained in the class file.
|
ClassFileSource |
friendSource(String className)
Build a "friend" source file specification for the class of
the given name.
|
DataOutputStream |
getOutputStream(File dest)
Get a DataOutputStream to which a class file should be written.
|
boolean |
isStreamed()
Does this class originate in a zip file?
|
boolean |
isZipped()
Does this class originate in a zip file?
|
long |
modificationDate()
Get the modification date of the class file.
|
ClassFileSource |
nextSource(String className)
Attempt to find the next possible source of the class
|
boolean |
sameAs(ClassFileSource other)
Does the other class file source refer to the same source location?
|
void |
setExpectedClassName(String name)
Set the name of the class contained in the class file.
|
void |
setModificationDate(long date)
Set the cached modification date of the class file.
|
getI18N, getI18N, getI18N, getI18N, getI18N, getI18Npublic ClassFileSource(String className, File classFile)
className - The expected name of the classclassFile - The file containing the class. This file should
exist and be readable.public ClassFileSource(String className, ZipFile zipFile)
className - The expected name of the classzipFile - The zip file containing the class. This file should
exist and be readable.public ClassFileSource(String className, InputStream byteCodeStream)
className - The expected name of the classbyteCodeStream - containing the class file.public boolean sameAs(ClassFileSource other)
public boolean isZipped()
public boolean isStreamed()
public String expectedClassName()
public void setExpectedClassName(String name)
public String containingFilePath()
public ClassFileSource nextSource(String className)
public ClassFileSource friendSource(String className)
public DataInputStream classFileContents() throws IOException, FileNotFoundException
IOExceptionFileNotFoundExceptionpublic long modificationDate()
throws FileNotFoundException
FileNotFoundExceptionpublic void setModificationDate(long date)
public File computeDestination(File destDir) throws IOException, FileNotFoundException
IOExceptionFileNotFoundExceptionpublic DataOutputStream getOutputStream(File dest) throws IOException, FileNotFoundException
IOExceptionFileNotFoundExceptionCopyright © 2013. All Rights Reserved.