public class APGeneratorDestinaton extends java.lang.Object implements GeneratorDestination
Modifier and Type | Field and Description |
---|---|
private javax.annotation.processing.ProcessingEnvironment |
processingEnv |
private javax.annotation.processing.RoundEnvironment |
roundEnv |
Constructor and Description |
---|
APGeneratorDestinaton(javax.annotation.processing.RoundEnvironment roundEnv,
javax.annotation.processing.ProcessingEnvironment processingEnv) |
Modifier and Type | Method and Description |
---|---|
java.io.Reader |
getResource(java.lang.String resourcePath)
Returns the Reader for the given resource.
|
java.io.Writer |
newClass(java.lang.String className)
Returns the Writer for the given class.
|
java.io.Writer |
newResource(java.lang.String resourcePath)
Returns the Writer for the given resource.
|
void |
printError(java.lang.String message)
Print the error.
|
void |
printError(java.lang.String message,
MetadataInfo element)
Print the error.
|
void |
printError(java.lang.String message,
java.lang.Throwable throwable)
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,
MetadataInfo element)
Print the warning.
|
void |
printWarning(java.lang.String message,
java.lang.Throwable throwable)
Print the warning.
|
private final javax.annotation.processing.RoundEnvironment roundEnv
private final javax.annotation.processing.ProcessingEnvironment processingEnv
public APGeneratorDestinaton(javax.annotation.processing.RoundEnvironment roundEnv, javax.annotation.processing.ProcessingEnvironment processingEnv)
public java.io.Writer newResource(java.lang.String resourcePath) throws java.io.IOException
GeneratorDestination
newResource
in interface GeneratorDestination
resourcePath
- resource pathjava.io.IOException
- if something wacked happenspublic java.io.Reader getResource(java.lang.String resourcePath) throws java.io.IOException
GeneratorDestination
getResource
in interface GeneratorDestination
resourcePath
- resource pathjava.io.IOException
- if something wacked happenspublic java.io.Writer newClass(java.lang.String className) throws java.io.IOException
GeneratorDestination
newClass
in interface GeneratorDestination
className
- class namejava.io.IOException
- if something wacked happenspublic void printError(java.lang.String message)
GeneratorDestination
printError
in interface GeneratorDestination
message
- error.public void printError(java.lang.String message, MetadataInfo element)
GeneratorDestination
printError
in interface GeneratorDestination
message
- error.element
- metadata element, to which this error is tailoredpublic void printError(java.lang.String message, java.lang.Throwable throwable)
GeneratorDestination
printError
in interface GeneratorDestination
message
- error.throwable
- exception causing the errorpublic void printWarning(java.lang.String message)
GeneratorDestination
printWarning
in interface GeneratorDestination
message
- warning.public void printWarning(java.lang.String message, MetadataInfo element)
GeneratorDestination
printWarning
in interface GeneratorDestination
message
- warning.element
- metadata element, to which this error is tailoredpublic void printWarning(java.lang.String message, java.lang.Throwable throwable)
GeneratorDestination
printWarning
in interface GeneratorDestination
message
- warning.throwable
- exception causing the errorpublic void printNote(java.lang.String message)
GeneratorDestination
printNote
in interface GeneratorDestination
message
- message.