Constructor and Description |
---|
Filer(File outputPath,
Charset encoding)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
File |
getFolderFor(Name packageNameOrNull)
Returns the folder for the target package.
|
File |
getFolderFor(PackageDeclaration packageDeclOrNull)
Returns the folder for the target package.
|
PrintWriter |
openFor(PackageDeclaration packageDeclOrNull,
String subPath)
Creates a new resource file and returns the writer for writing the contents of the resource.
|
findPrimaryType, openFor
public Filer(File outputPath, Charset encoding)
outputPath
- the base output directoryencoding
- the character set encoding of generating source filesIllegalArgumentException
- if the parameters are null
public File getFolderFor(PackageDeclaration packageDeclOrNull)
packageDeclOrNull
- the target package, or null
for the default (unnamed) packagepublic File getFolderFor(Name packageNameOrNull)
packageNameOrNull
- the target package, or null
for the default (unnamed) packagepublic PrintWriter openFor(PackageDeclaration packageDeclOrNull, String subPath) throws IOException
Emitter
openFor
in class Emitter
packageDeclOrNull
- the base package, or null
if it is the default (unnamed) packagesubPath
- the relative path from the base packageIOException
- if error was occurred while creating the target resourceCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.