public interface JavaFileProvider extends JavaProvider
JavaFileProvider
extends the JavaProvider
interface by providing methods to retrieve a JavaFile
or SourceFile
from a Java class or source URL.Modifier and Type | Method and Description |
---|---|
SourceFile |
createSourceFile(java.net.URL sourceURL)
Creates a new SourceFile for the given Java source URL (*.java).
|
JavaFile |
getFile(java.net.URL url)
Fetch the JavaFile for the given URL.
|
SourceFile |
getSourceFile(TextBuffer textBuffer)
Creates a new SourceFile from the input TextBuffer but NOT tied any particular Java source URL.
|
SourceFile |
getSourceFile(java.net.URL sourceURL)
Fetch the SourceFile for the given Java source URL (*.java).
|
getArrayType, getClass, getClass, getClassByVMName, getPackage, getSourceClass, getTextBuffer
JavaFile getFile(java.net.URL url)
url
- the URL to get the Java file forSourceFile getSourceFile(java.net.URL sourceURL)
sourceURL
- the source URL to get the Java file forSourceFile createSourceFile(java.net.URL sourceURL) throws java.io.IOException, java.lang.IllegalArgumentException
sourceURL
- the source URL to create a new Java file forjava.io.IOException
- if the new file cannot be createdjava.lang.IllegalArgumentException
- if the URL is not recognized as a Java source fileSourceFile getSourceFile(TextBuffer textBuffer)