|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.jdo.api.persistence.enhancer.util.Assertion
com.sun.jdo.api.persistence.enhancer.util.Support
com.sun.jdo.api.persistence.enhancer.util.ClassFileSource
public class ClassFileSource
ClassFileSource provides a mechanism for associating a class with the source of that class. The source is currently either an ordinary .class file or a zip file 1 or more class files.
| Field Summary |
|---|
| Fields inherited from class com.sun.jdo.api.persistence.enhancer.util.Support |
|---|
timer |
| Constructor Summary | |
|---|---|
ClassFileSource(String className,
File classFile)
Constructor |
|
ClassFileSource(String className,
InputStream byteCodeStream)
Constructor |
|
ClassFileSource(String className,
ZipFile zipFile)
Constructor |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class com.sun.jdo.api.persistence.enhancer.util.Support |
|---|
getI18N, getI18N, getI18N, getI18N, getI18N, getI18N |
| Methods inherited from class com.sun.jdo.api.persistence.enhancer.util.Assertion |
|---|
affirm, affirm, affirm, affirm |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public 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.| Method Detail |
|---|
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
IOException
FileNotFoundException
public long modificationDate()
throws FileNotFoundException
FileNotFoundExceptionpublic void setModificationDate(long date)
public File computeDestination(File destDir)
throws IOException,
FileNotFoundException
IOException
FileNotFoundException
public DataOutputStream getOutputStream(File dest)
throws IOException,
FileNotFoundException
IOException
FileNotFoundException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||