Class CompiledCode

  • All Implemented Interfaces:
    javax.tools.FileObject, javax.tools.JavaFileObject

    public class CompiledCode
    extends javax.tools.SimpleJavaFileObject
    Created by trung on 5/3/15. https://github.com/trung/InMemoryJavaCompiler Apache 2 License
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface javax.tools.JavaFileObject

        javax.tools.JavaFileObject.Kind
    • Field Summary

      • Fields inherited from class javax.tools.SimpleJavaFileObject

        kind, uri
    • Constructor Summary

      Constructors 
      Constructor Description
      CompiledCode​(java.lang.String className)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] getByteCode()  
      java.io.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
    • Constructor Detail

      • CompiledCode

        public CompiledCode​(java.lang.String className)
                     throws java.lang.Exception
        Throws:
        java.lang.Exception
    • Method Detail

      • openOutputStream

        public java.io.OutputStream openOutputStream()
                                              throws java.io.IOException
        Specified by:
        openOutputStream in interface javax.tools.FileObject
        Overrides:
        openOutputStream in class javax.tools.SimpleJavaFileObject
        Throws:
        java.io.IOException
      • getByteCode

        public byte[] getByteCode()