Class APGeneratorDestinaton
- java.lang.Object
-
- org.openjdk.jmh.generators.annotations.APGeneratorDestinaton
-
- All Implemented Interfaces:
GeneratorDestination
public class APGeneratorDestinaton extends java.lang.Object implements GeneratorDestination
-
-
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.
-
-
-
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 interfaceGeneratorDestination
- 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 interfaceGeneratorDestination
- 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 interfaceGeneratorDestination
- Parameters:
className
- class nameoriginatingClassName
- 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 interfaceGeneratorDestination
- 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 interfaceGeneratorDestination
- 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 interfaceGeneratorDestination
- 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 interfaceGeneratorDestination
- 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 interfaceGeneratorDestination
- 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 interfaceGeneratorDestination
- 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 interfaceGeneratorDestination
- Parameters:
message
- message.
-
-