Class MemorySource

  • All Implemented Interfaces:
    java.io.Serializable, javax.tools.FileObject, javax.tools.JavaFileObject

    public class MemorySource
    extends MemoryFile
    implements java.io.Serializable
    memory source object that represents a source file for in-memory compilation
    See Also:
    Serialized Form
    • 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
      MemorySource()  
      MemorySource​(java.lang.String name, java.lang.String src)
      constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.CharSequence getCharContent​(boolean ignoreEncodingErrors)
      get character content
      java.lang.String getClassName()  
      java.io.InputStream openInputStream()
      open new input stream
      java.io.OutputStream openOutputStream()
      open new output stream
      java.lang.String toString()  
      • Methods inherited from class javax.tools.SimpleJavaFileObject

        delete, getAccessLevel, getKind, getLastModified, getName, getNestingKind, isNameCompatible, openReader, openWriter, toUri
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • MemorySource

        public MemorySource()
      • MemorySource

        public MemorySource​(java.lang.String name,
                            java.lang.String src)
        constructor
        Parameters:
        name - class name
        src - source string
    • Method Detail

      • getClassName

        public java.lang.String getClassName()
      • getCharContent

        public java.lang.CharSequence getCharContent​(boolean ignoreEncodingErrors)
        get character content
        Specified by:
        getCharContent in interface javax.tools.FileObject
        Overrides:
        getCharContent in class javax.tools.SimpleJavaFileObject
        Parameters:
        ignoreEncodingErrors - true to ignore encoding errors, otherwise false
        Returns:
        source as char sequence
      • openOutputStream

        public java.io.OutputStream openOutputStream()
        open new output stream
        Specified by:
        openOutputStream in interface javax.tools.FileObject
        Overrides:
        openOutputStream in class javax.tools.SimpleJavaFileObject
        Returns:
        output stream
      • openInputStream

        public java.io.InputStream openInputStream()
        open new input stream
        Specified by:
        openInputStream in interface javax.tools.FileObject
        Overrides:
        openInputStream in class javax.tools.SimpleJavaFileObject
        Returns:
        input stream
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class javax.tools.SimpleJavaFileObject