Package oms3.compiler
Class UrlJavaFileObject
- java.lang.Object
-
- javax.tools.SimpleJavaFileObject
-
- oms3.compiler.UrlJavaFileObject
-
- All Implemented Interfaces:
FileObject,JavaFileObject
public class UrlJavaFileObject extends SimpleJavaFileObject
A Java file object that reads from a URL.- Author:
- prunge
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface javax.tools.JavaFileObject
JavaFileObject.Kind
-
-
Field Summary
-
Fields inherited from class javax.tools.SimpleJavaFileObject
kind, uri
-
-
Constructor Summary
Constructors Constructor Description UrlJavaFileObject(String name, URL url, JavaFileObject.Kind kind, String binaryName)Constructs aURLJavaFileObject.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetBinaryName()InputStreamopenInputStream()-
Methods inherited from class javax.tools.SimpleJavaFileObject
delete, getAccessLevel, getCharContent, getKind, getLastModified, getName, getNestingKind, isNameCompatible, openOutputStream, openReader, openWriter, toString, toUri
-
-
-
-
Constructor Detail
-
UrlJavaFileObject
public UrlJavaFileObject(String name, URL url, JavaFileObject.Kind kind, String binaryName) throws URISyntaxException
Constructs aURLJavaFileObject.- Parameters:
name- the file name.url- the URL of the file.kind- the kind of file.binaryName- the binary name of the file.- Throws:
URISyntaxException- if an error occurs convertingnameto a URI.
-
-
Method Detail
-
openInputStream
public InputStream openInputStream() throws IOException
- Specified by:
openInputStreamin interfaceFileObject- Overrides:
openInputStreamin classSimpleJavaFileObject- Throws:
IOException
-
getBinaryName
public String getBinaryName()
-
-