public class BinaryClass extends Object implements JavaFileObject
JavaFileObject.Kind| Modifier | Constructor and Description |
|---|---|
protected |
BinaryClass(String name)
Constructor that accepts class name as parameter
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
delete()
Unsupported operation, returns false
|
Modifier |
getAccessLevel() |
byte[] |
getBytes()
Returns bytes of class
|
CharSequence |
getCharContent(boolean ignoreEncodingErrors)
|
Class<?> |
getDefinedClass()
Returns class that was loaded from binary data of this object
|
JavaFileObject.Kind |
getKind() |
long |
getLastModified()
Unsupported operation, always reutrns 0
|
String |
getName()
Deprecated.
|
NestingKind |
getNestingKind() |
protected String |
inferBinaryName(Iterable<? extends File> path)
Returns class name
|
boolean |
isNameCompatible(String simpleName,
JavaFileObject.Kind kind)
Returns true if
JavaFileObject.Kind.CLASS |
InputStream |
openInputStream()
Creates new ByteArrayInputStream, it just wraps class binary data
|
OutputStream |
openOutputStream()
Opens ByteArrayOutputStream for class data
|
Reader |
openReader(boolean ignoreEncodingErrors) |
Writer |
openWriter()
|
void |
setDefinedClass(Class<?> definedClass)
Sets class that was loaded by this object
|
URI |
toUri()
|
protected BinaryClass(String name)
name - class namepublic URI toUri()
toUri in interface FileObject@Deprecated public String getName()
getName in interface FileObjectpublic InputStream openInputStream() throws IOException
openInputStream in interface FileObjectIOException - never thrownpublic OutputStream openOutputStream() throws IOException
openOutputStream in interface FileObjectIOException - never thrownpublic CharSequence getCharContent(boolean ignoreEncodingErrors) throws IOException
getCharContent in interface FileObjectIOExceptionpublic Writer openWriter() throws IOException
openWriter in interface FileObjectIOExceptionpublic long getLastModified()
getLastModified in interface FileObjectpublic boolean delete()
delete in interface FileObjectprotected String inferBinaryName(Iterable<? extends File> path)
path - doesn't matterpublic boolean isNameCompatible(String simpleName, JavaFileObject.Kind kind)
JavaFileObject.Kind.CLASSisNameCompatible in interface JavaFileObjectsimpleName - doesn't matterkind - kind to compareJavaFileObject.Kind.CLASSpublic byte[] getBytes()
public Class<?> getDefinedClass()
public void setDefinedClass(Class<?> definedClass)
definedClass - class that was loadedpublic JavaFileObject.Kind getKind()
getKind in interface JavaFileObjectpublic Reader openReader(boolean ignoreEncodingErrors) throws IOException
openReader in interface FileObjectIOExceptionpublic NestingKind getNestingKind()
getNestingKind in interface JavaFileObjectpublic Modifier getAccessLevel()
getAccessLevel in interface JavaFileObjectCopyright © 2014–2015. All rights reserved.