Class TurbineFiler

  • All Implemented Interfaces:
    javax.annotation.processing.Filer

    public class TurbineFiler
    extends java.lang.Object
    implements javax.annotation.processing.Filer
    Turbine's implementation of Filer.
    • Constructor Summary

      Constructors 
      Constructor Description
      TurbineFiler​(java.util.Set<java.lang.String> seen, java.util.function.Function<java.lang.String,​com.google.common.base.Supplier<byte[]>> classPath, java.lang.ClassLoader loader)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javax.tools.JavaFileObject createClassFile​(java.lang.CharSequence n, javax.lang.model.element.Element... originatingElements)  
      javax.tools.FileObject createResource​(javax.tools.JavaFileManager.Location location, java.lang.CharSequence p, java.lang.CharSequence r, javax.lang.model.element.Element... originatingElements)  
      javax.tools.JavaFileObject createSourceFile​(java.lang.CharSequence n, javax.lang.model.element.Element... originatingElements)  
      java.util.Collection<SourceFile> finishRound()
      Called when the current annotation processing round is complete, and returns the sources generated in that round.
      com.google.common.collect.ImmutableMap<java.lang.String,​byte[]> generatedClasses()
      Generated class file objects from all rounds.
      com.google.common.collect.ImmutableMap<java.lang.String,​SourceFile> generatedSources()
      Generated source file objects from all rounds.
      javax.tools.FileObject getResource​(javax.tools.JavaFileManager.Location location, java.lang.CharSequence p, java.lang.CharSequence r)  
      • Methods inherited from class java.lang.Object

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

      • TurbineFiler

        public TurbineFiler​(java.util.Set<java.lang.String> seen,
                            java.util.function.Function<java.lang.String,​com.google.common.base.Supplier<byte[]>> classPath,
                            java.lang.ClassLoader loader)
    • Method Detail

      • generatedSources

        public com.google.common.collect.ImmutableMap<java.lang.String,​SourceFile> generatedSources()
        Generated source file objects from all rounds.
      • generatedClasses

        public com.google.common.collect.ImmutableMap<java.lang.String,​byte[]> generatedClasses()
        Generated class file objects from all rounds.
      • finishRound

        public java.util.Collection<SourceFile> finishRound()
        Called when the current annotation processing round is complete, and returns the sources generated in that round.
      • createSourceFile

        public javax.tools.JavaFileObject createSourceFile​(java.lang.CharSequence n,
                                                           javax.lang.model.element.Element... originatingElements)
                                                    throws java.io.IOException
        Specified by:
        createSourceFile in interface javax.annotation.processing.Filer
        Throws:
        java.io.IOException
      • createClassFile

        public javax.tools.JavaFileObject createClassFile​(java.lang.CharSequence n,
                                                          javax.lang.model.element.Element... originatingElements)
                                                   throws java.io.IOException
        Specified by:
        createClassFile in interface javax.annotation.processing.Filer
        Throws:
        java.io.IOException
      • createResource

        public javax.tools.FileObject createResource​(javax.tools.JavaFileManager.Location location,
                                                     java.lang.CharSequence p,
                                                     java.lang.CharSequence r,
                                                     javax.lang.model.element.Element... originatingElements)
                                              throws java.io.IOException
        Specified by:
        createResource in interface javax.annotation.processing.Filer
        Throws:
        java.io.IOException
      • getResource

        public javax.tools.FileObject getResource​(javax.tools.JavaFileManager.Location location,
                                                  java.lang.CharSequence p,
                                                  java.lang.CharSequence r)
                                           throws java.io.IOException
        Specified by:
        getResource in interface javax.annotation.processing.Filer
        Throws:
        java.io.IOException