GeneratorDestination
public class FileSystemDestination extends Object implements GeneratorDestination
Constructor | Description |
---|---|
FileSystemDestination(File resourceDir,
File sourceDir) |
Modifier and Type | Method | Description |
---|---|---|
Collection<SourceError> |
getErrors() |
|
Reader |
getResource(String resourcePath) |
Returns the Reader for the given resource.
|
Collection<SourceWarning> |
getWarnings() |
|
boolean |
hasErrors() |
|
boolean |
hasWarnings() |
|
Writer |
newClass(String className) |
Returns the Writer for the given class.
|
Writer |
newResource(String resourcePath) |
Returns the Writer for the given resource.
|
void |
printError(String message) |
Print the error.
|
void |
printError(String message,
Throwable throwable) |
Print the error.
|
void |
printError(String message,
MetadataInfo element) |
Print the error.
|
void |
printNote(String message) |
Print the informative message.
|
void |
printWarning(String message) |
Print the warning.
|
void |
printWarning(String message,
Throwable throwable) |
Print the warning.
|
void |
printWarning(String message,
MetadataInfo element) |
Print the warning.
|
public Writer newResource(String resourcePath) throws IOException
GeneratorDestination
newResource
in interface GeneratorDestination
resourcePath
- resource pathIOException
- if something wacked happenspublic Reader getResource(String resourcePath) throws IOException
GeneratorDestination
getResource
in interface GeneratorDestination
resourcePath
- resource pathIOException
- if something wacked happenspublic Writer newClass(String className) throws IOException
GeneratorDestination
newClass
in interface GeneratorDestination
className
- class nameIOException
- if something wacked happenspublic void printError(String message)
GeneratorDestination
printError
in interface GeneratorDestination
message
- error.public void printError(String message, MetadataInfo element)
GeneratorDestination
printError
in interface GeneratorDestination
message
- error.element
- metadata element, to which this error is tailoredpublic void printError(String message, Throwable throwable)
GeneratorDestination
printError
in interface GeneratorDestination
message
- error.throwable
- exception causing the errorpublic boolean hasErrors()
public Collection<SourceError> getErrors()
public void printWarning(String message)
GeneratorDestination
printWarning
in interface GeneratorDestination
message
- warning.public void printWarning(String message, MetadataInfo element)
GeneratorDestination
printWarning
in interface GeneratorDestination
message
- warning.element
- metadata element, to which this error is tailoredpublic void printWarning(String message, Throwable throwable)
GeneratorDestination
printWarning
in interface GeneratorDestination
message
- warning.throwable
- exception causing the errorpublic boolean hasWarnings()
public Collection<SourceWarning> getWarnings()
public void printNote(String message)
GeneratorDestination
printNote
in interface GeneratorDestination
message
- message.Copyright © 2012-2016 Oracle. All Rights Reserved.