public class LibraryTranslation extends Object
Constructor and Description |
---|
LibraryTranslation() |
Modifier and Type | Method and Description |
---|---|
Library |
getLibrary()
Returns the Library that this LibraryTranslation belongs too.
|
String |
getName()
Gets the name of this LibraryTranslation.
|
String |
getTemplate()
Gets the path to the template for this instance.
|
String |
getTranslationFragment(String name,
String kind)
Gets the current "translated" value of this fragmentName for resulting from the last processTranslation method
|
Translator |
getTranslator()
Gets the Translator instance that will perform processing of the template.
|
String |
getVariable()
Gets the variable name which is made available to the translation template.
|
void |
handleTranslationFragment(String name,
String kind,
Object node)
Calls the handlerMethod from a translation fragment.
|
Translation |
processTranslation(Map<String,Object> templateContext)
Processes the template belonging to this LibraryTranslation and returns the Translation objects.
|
void |
setLibrary(Library library)
Sets the
Library to which this LibraryInstance belongs. |
void |
setName(String name)
Sets the name.
|
void |
setTemplate(String template)
Sets the path to the template.
|
protected void |
setTranslation(Reader translationInput)
The processed translation template as a Reader.
|
void |
setTranslator(String translatorClass)
Sets the Translator class that will perform the translation processing.
|
void |
setVariable(String variable)
Sets the variable name which is made available to the translation template.
|
String |
toString() |
public LibraryTranslation()
public String getTemplate()
public void setTemplate(String template)
template
- the path to the templatepublic Library getLibrary()
public void setLibrary(Library library)
Library
to which this LibraryInstance belongs.library
- public String getVariable()
public void setVariable(String variable)
variable
- the variable name.public void setTranslator(String translatorClass)
translatorClass
- the class of the translator.public Translator getTranslator()
public void handleTranslationFragment(String name, String kind, Object node)
name
- the name of the fragment to retrieve.node
- the node Object which from the parsed expression.kind
- the kind of the translation fragment to handle.public String getTranslationFragment(String name, String kind)
name
- the name of the fragment to retrieve.kind
- the kind or type of fragment to retrieve (this is the based on the expression type: body, inv, post,
pre, etc).protected void setTranslation(Reader translationInput)
translationInput
- public Translation processTranslation(Map<String,Object> templateContext)
template
hasn't been set (i.e. is null, then this method won't do anything but return a null
value).templateContext
- any key/value pairs that should be passed to the TemplateEngine while processing the
translation template.public String toString()
toString
in class Object
Object.toString()
Copyright © 2003–2014 AndroMDA.org. All rights reserved.