public abstract class JarFileObject extends Object implements JavaFileObject
JavaFileObject implementation that allows using jar URIs unlike SimpleJavaFileObject that assumes the uri used is a file system uri. This implementation can be
used when the CLASS_OUTPUT is represented by a straight to jar write. The only content that it
stores is the full uri, the relative path within the jar and the kind of the FileObject.JavaFileObject.Kind| Modifier and Type | Field and Description |
|---|---|
protected JavaFileObject.Kind |
kind |
protected String |
pathInJar |
protected URI |
uri |
| Constructor and Description |
|---|
JarFileObject(URI uri,
String pathInJar,
JavaFileObject.Kind kind) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
delete() |
Modifier |
getAccessLevel() |
JavaFileObject.Kind |
getKind() |
long |
getLastModified() |
String |
getName() |
NestingKind |
getNestingKind() |
boolean |
isNameCompatible(String simpleName,
JavaFileObject.Kind kind) |
String |
toString() |
URI |
toUri() |
abstract void |
writeToJar(JarBuilder jarBuilder,
String owner) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetCharContent, openInputStream, openOutputStream, openReader, openWriterprotected final URI uri
protected final String pathInJar
protected final JavaFileObject.Kind kind
public JarFileObject(URI uri, String pathInJar, JavaFileObject.Kind kind)
public URI toUri()
toUri in interface FileObjectpublic String getName()
getName in interface FileObjectpublic long getLastModified()
getLastModified in interface FileObjectpublic boolean delete()
delete in interface FileObjectpublic JavaFileObject.Kind getKind()
getKind in interface JavaFileObjectpublic boolean isNameCompatible(String simpleName, JavaFileObject.Kind kind)
isNameCompatible in interface JavaFileObject@Nullable public NestingKind getNestingKind()
getNestingKind in interface JavaFileObject@Nullable public Modifier getAccessLevel()
getAccessLevel in interface JavaFileObjectpublic abstract void writeToJar(JarBuilder jarBuilder, String owner)