public class FileSystemDestination extends Object implements GeneratorDestination
Constructor and Description |
---|
FileSystemDestination(File resourceDir,
File sourceDir) |
Modifier and Type | Method and Description |
---|---|
Collection<SourceError> |
getErrors() |
InputStream |
getResource(String resourcePath)
Returns the stream for the given resource.
|
Collection<SourceWarning> |
getWarnings() |
boolean |
hasErrors() |
boolean |
hasWarnings() |
Writer |
newClass(String className)
Returns the Writer for the given class.
|
OutputStream |
newResource(String resourcePath)
Returns the stream for the given resource.
|
void |
printError(String message)
Print the error.
|
void |
printError(String message,
MetadataInfo element)
Print the error.
|
void |
printError(String message,
Throwable throwable)
Print the error.
|
void |
printNote(String message)
Print the informative message.
|
void |
printWarning(String message)
Print the warning.
|
void |
printWarning(String message,
MetadataInfo element)
Print the warning.
|
void |
printWarning(String message,
Throwable throwable)
Print the warning.
|
public OutputStream newResource(String resourcePath) throws IOException
GeneratorDestination
newResource
in interface GeneratorDestination
resourcePath
- resource pathIOException
- if something wacked happenspublic InputStream 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–2020 Oracle. All rights reserved.