com.kirgor.enklib.compile
Class MemoryJavaClassObject

java.lang.Object
  extended by javax.tools.SimpleJavaFileObject
      extended by com.kirgor.enklib.compile.MemoryJavaClassObject
All Implemented Interfaces:
FileObject, JavaFileObject

public class MemoryJavaClassObject
extends SimpleJavaFileObject


Nested Class Summary
 
Nested classes/interfaces inherited from interface javax.tools.JavaFileObject
JavaFileObject.Kind
 
Field Summary
protected  ByteArrayOutputStream stream
           
 
Fields inherited from class javax.tools.SimpleJavaFileObject
kind, uri
 
Constructor Summary
MemoryJavaClassObject(String className, JavaFileObject.Kind kind)
          Creates instance of MemoryJavaClassObject.
 
Method Summary
 byte[] getBytes()
          Gets compiled byte code.
 String getClassName()
          Gets the name of stored class.
 OutputStream openOutputStream()
          
 
Methods inherited from class javax.tools.SimpleJavaFileObject
delete, getAccessLevel, getCharContent, getKind, getLastModified, getName, getNestingKind, isNameCompatible, openInputStream, openReader, openWriter, toString, toUri
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

stream

protected final ByteArrayOutputStream stream
Constructor Detail

MemoryJavaClassObject

public MemoryJavaClassObject(String className,
                             JavaFileObject.Kind kind)
Creates instance of MemoryJavaClassObject.

Parameters:
className - Name of class to store.
kind - Kind of the data.
Method Detail

getBytes

public byte[] getBytes()
Gets compiled byte code.


getClassName

public String getClassName()
Gets the name of stored class.


openOutputStream

public OutputStream openOutputStream()
                              throws IOException

Specified by:
openOutputStream in interface FileObject
Overrides:
openOutputStream in class SimpleJavaFileObject
Throws:
IOException


Copyright © 2013. All Rights Reserved.