Class APGeneratorDestinaton

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private javax.annotation.processing.ProcessingEnvironment processingEnv  
    • Constructor Summary

      Constructors 
      Constructor Description
      APGeneratorDestinaton​(javax.annotation.processing.RoundEnvironment roundEnv, javax.annotation.processing.ProcessingEnvironment processingEnv)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.io.InputStream getResource​(java.lang.String resourcePath)
      Returns the stream for the given resource.
      java.io.Writer newClass​(java.lang.String className, java.lang.String originatingClassName)
      Returns the Writer for the given class.
      java.io.OutputStream newResource​(java.lang.String resourcePath)
      Returns the stream for the given resource.
      void printError​(java.lang.String message)
      Print the error.
      void printError​(java.lang.String message, java.lang.Throwable throwable)
      Print the error.
      void printError​(java.lang.String message, MetadataInfo element)
      Print the error.
      void printNote​(java.lang.String message)
      Print the informative message.
      void printWarning​(java.lang.String message)
      Print the warning.
      void printWarning​(java.lang.String message, java.lang.Throwable throwable)
      Print the warning.
      void printWarning​(java.lang.String message, MetadataInfo element)
      Print the warning.
      • Methods inherited from class java.lang.Object

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

      • processingEnv

        private final javax.annotation.processing.ProcessingEnvironment processingEnv
    • Constructor Detail

      • APGeneratorDestinaton

        public APGeneratorDestinaton​(javax.annotation.processing.RoundEnvironment roundEnv,
                                     javax.annotation.processing.ProcessingEnvironment processingEnv)
    • Method Detail

      • newResource

        public java.io.OutputStream newResource​(java.lang.String resourcePath)
                                         throws java.io.IOException
        Description copied from interface: GeneratorDestination
        Returns the stream for the given resource. Callers are responsible for closing streams.
        Specified by:
        newResource in interface GeneratorDestination
        Parameters:
        resourcePath - resource path
        Returns:
        output stream to write the resource to.
        Throws:
        java.io.IOException - if something wacked happens
      • getResource

        public java.io.InputStream getResource​(java.lang.String resourcePath)
                                        throws java.io.IOException
        Description copied from interface: GeneratorDestination
        Returns the stream for the given resource. Callers are responsible for closing streams.
        Specified by:
        getResource in interface GeneratorDestination
        Parameters:
        resourcePath - resource path
        Returns:
        stream usable to read the resource
        Throws:
        java.io.IOException - if something wacked happens
      • newClass

        public java.io.Writer newClass​(java.lang.String className,
                                       java.lang.String originatingClassName)
                                throws java.io.IOException
        Description copied from interface: GeneratorDestination
        Returns the Writer for the given class. Callers are responsible for closing Writers.
        Specified by:
        newClass in interface GeneratorDestination
        Parameters:
        className - class name
        originatingClassName - class name causing the creation of this class
        Returns:
        writer usable to write the resource
        Throws:
        java.io.IOException - if something wacked happens
      • printError

        public void printError​(java.lang.String message)
        Description copied from interface: GeneratorDestination
        Print the error. Calling this method should not terminate anything.
        Specified by:
        printError in interface GeneratorDestination
        Parameters:
        message - error.
      • printError

        public void printError​(java.lang.String message,
                               MetadataInfo element)
        Description copied from interface: GeneratorDestination
        Print the error. Calling this method should not terminate anything.
        Specified by:
        printError in interface GeneratorDestination
        Parameters:
        message - error.
        element - metadata element, to which this error is tailored
      • printError

        public void printError​(java.lang.String message,
                               java.lang.Throwable throwable)
        Description copied from interface: GeneratorDestination
        Print the error. Calling this method should not terminate anything.
        Specified by:
        printError in interface GeneratorDestination
        Parameters:
        message - error.
        throwable - exception causing the error
      • printWarning

        public void printWarning​(java.lang.String message)
        Description copied from interface: GeneratorDestination
        Print the warning. Calling this method should not terminate anything.
        Specified by:
        printWarning in interface GeneratorDestination
        Parameters:
        message - warning.
      • printWarning

        public void printWarning​(java.lang.String message,
                                 MetadataInfo element)
        Description copied from interface: GeneratorDestination
        Print the warning. Calling this method should not terminate anything.
        Specified by:
        printWarning in interface GeneratorDestination
        Parameters:
        message - warning.
        element - metadata element, to which this error is tailored
      • printWarning

        public void printWarning​(java.lang.String message,
                                 java.lang.Throwable throwable)
        Description copied from interface: GeneratorDestination
        Print the warning. Calling this method should not terminate anything.
        Specified by:
        printWarning in interface GeneratorDestination
        Parameters:
        message - warning.
        throwable - exception causing the error
      • printNote

        public void printNote​(java.lang.String message)
        Description copied from interface: GeneratorDestination
        Print the informative message. Calling this method should not terminate anything.
        Specified by:
        printNote in interface GeneratorDestination
        Parameters:
        message - message.