public abstract class AbstractLocalizableInterfaceCreator extends Object
MessagesInterfaceCreator
and
ConstantsInterfaceCreator
.Modifier and Type | Field and Description |
---|---|
protected SourceWriter |
composer
Composer for the current Constant.
|
Constructor and Description |
---|
AbstractLocalizableInterfaceCreator(String className,
String packageName,
File resourceBundle,
File targetLocation,
Class<? extends Localizable> interfaceClass)
Creates a new constants creator.
|
Modifier and Type | Method and Description |
---|---|
void |
generate()
Generate class.
|
protected abstract void |
genMethodArgs(String defaultValue)
Create method args based upon the default value.
|
void |
genSimpleMethodDecl(String key,
String defaultValue)
Create a String method declaration from a Dictionary/value pair.
|
protected abstract void |
genValueAnnotation(String defaultValue)
Create an annotation to hold the default value.
|
protected abstract String |
javaDocComment(String path)
Returns the javaDocComment for the class.
|
protected String |
makeJavaString(String value) |
protected SourceWriter composer
public AbstractLocalizableInterfaceCreator(String className, String packageName, File resourceBundle, File targetLocation, Class<? extends Localizable> interfaceClass) throws IOException
className
- constant class to createpackageName
- package to create it inresourceBundle
- resource bundle with valuetargetLocation
- IOException
public void generate() throws FileNotFoundException, IOException
FileNotFoundException
IOException
public void genSimpleMethodDecl(String key, String defaultValue)
key
- DictionarydefaultValue
- default valueprotected abstract void genMethodArgs(String defaultValue)
defaultValue
- protected abstract void genValueAnnotation(String defaultValue)
protected abstract String javaDocComment(String path)
path
- path of classCopyright © 2016. All rights reserved.