Class ClassFile
java.lang.Object
javax.tools.SimpleJavaFileObject
org.glassfish.jersey.examples.reload.compiler.ClassFile
- All Implemented Interfaces:
FileObject,JavaFileObject
Class file representation.
- Author:
- Jakub Podlesak
-
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 -
Method Summary
Modifier and TypeMethodDescriptionbyte[]Returns byte code representation of the class after the class has been compiled.Getter for class name associated with this class file.Methods inherited from class javax.tools.SimpleJavaFileObject
delete, getAccessLevel, getCharContent, getKind, getLastModified, getName, getNestingKind, isNameCompatible, openInputStream, openReader, openWriter, toString, toUri
-
Constructor Details
-
ClassFile
Creates a new class file holder.- Parameters:
className- class name.- Throws:
URISyntaxException- in case given class name could not be represented as an URI.
-
-
Method Details
-
getClassName
Getter for class name associated with this class file.- Returns:
- class name.
-
openOutputStream
- Specified by:
openOutputStreamin interfaceFileObject- Overrides:
openOutputStreamin classSimpleJavaFileObject- Throws:
IOException
-
getByteCode
public byte[] getByteCode()Returns byte code representation of the class after the class has been compiled.- Returns:
- compiled byte code of the class.
-