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, wait
getCharContent, openInputStream, openOutputStream, openReader, openWriter
protected 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 FileObject
public String getName()
getName
in interface FileObject
public long getLastModified()
getLastModified
in interface FileObject
public boolean delete()
delete
in interface FileObject
public JavaFileObject.Kind getKind()
getKind
in interface JavaFileObject
public 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 JavaFileObject
public abstract void writeToJar(JarBuilder jarBuilder, String owner)