|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.google.template.soy.msgs.SoyMsgBundleHandler
public class SoyMsgBundleHandler
Handler for writing SoyMsgBundles to file format and for creating SoyMsgBundles
from files or resources.
Uses a SoyMsgPlugin to do the actual generation of the output data and the actual
parsing of the input data. The SoyMsgPlugin implements the specific message file format.
| Nested Class Summary | |
|---|---|
static class |
SoyMsgBundleHandler.OutputFileOptions
Options for generating an output message bundle file. |
| Constructor Summary | |
|---|---|
SoyMsgBundleHandler(SoyMsgPlugin msgPlugin)
|
|
| Method Summary | |
|---|---|
SoyMsgBundle |
createFromFile(File inputFile)
Reads an input messages file and creates a SoyMsgBundle. |
SoyMsgBundle |
createFromResource(URL inputResource)
Reads an input messages resource and creates a SoyMsgBundle. |
void |
writeToFile(SoyMsgBundle msgBundle,
File outputFile)
Converts a message bundle to output file format and writes it to file. |
void |
writeToFile(SoyMsgBundle msgBundle,
SoyMsgBundleHandler.OutputFileOptions options,
File outputFile)
Converts a message bundle to output file format and writes it to file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
@Inject public SoyMsgBundleHandler(SoyMsgPlugin msgPlugin)
| Method Detail |
|---|
public void writeToFile(SoyMsgBundle msgBundle,
File outputFile)
throws IOException,
SoyMsgException
msgBundle - The message bundle to write to file.outputFile - The output file to write to.
IOException - If there's an error while accessing the file.
SoyMsgException - If there's an error while processing the messages.
public void writeToFile(SoyMsgBundle msgBundle,
SoyMsgBundleHandler.OutputFileOptions options,
File outputFile)
throws IOException,
SoyMsgException
msgBundle - The message bundle to write to file.options - The options for generating the output file (some of the options may be needed,
depending on the SoyMsgPlugin used).outputFile - The output file to write to.
IOException - If there's an error while accessing the file.
SoyMsgException - If there's an error while processing the messages.
public SoyMsgBundle createFromFile(File inputFile)
throws IOException,
SoyMsgException
inputFile - The input file to read from.
IOException - If there's an error while accessing the file.
SoyMsgException - If there's an error while processing the messages.
public SoyMsgBundle createFromResource(URL inputResource)
throws IOException,
SoyMsgException
inputResource - The resource to read from.
IOException - If there's an error while accessing the resource.
SoyMsgException - If there's an error while processing the messages.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||