Class JavaSourceFromString

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

    class JavaSourceFromString
    extends javax.tools.SimpleJavaFileObject
    • Nested Class Summary

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

        javax.tools.JavaFileObject.Kind
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String code
      The source code of this "file".
      • Fields inherited from class javax.tools.SimpleJavaFileObject

        kind, uri
    • Constructor Summary

      Constructors 
      Constructor Description
      JavaSourceFromString​(@NotNull java.lang.String name, java.lang.String code)
      Constructs a new JavaSourceFromString.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.CharSequence getCharContent​(boolean ignoreEncodingErrors)  
      • Methods inherited from class javax.tools.SimpleJavaFileObject

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

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

      • code

        private final java.lang.String code
        The source code of this "file".
    • Constructor Detail

      • JavaSourceFromString

        JavaSourceFromString​(@NotNull
                             @NotNull java.lang.String name,
                             java.lang.String code)
        Constructs a new JavaSourceFromString.
        Parameters:
        name - the name of the compilation unit represented by this file object
        code - the source code for the compilation unit represented by this file object
    • Method Detail

      • getCharContent

        public java.lang.CharSequence getCharContent​(boolean ignoreEncodingErrors)
        Specified by:
        getCharContent in interface javax.tools.FileObject
        Overrides:
        getCharContent in class javax.tools.SimpleJavaFileObject