net.jangaroo.properties.templates.properties_class.ftl Maven / Gradle / Ivy
<#-- @ftlvariable name="" type="net.jangaroo.properties.model.PropertiesClass" -->
package ${resourceBundle.packageName} {
<#list imports as import>
import ${import};
<#if annotations??>
${annotations}
/**
<#if as3Comment??>
${as3Comment}
<#else>
* Interface values for ResourceBundle "${resourceBundle.bundleName}".
* @see ${resourceBundle.className}#INSTANCE
*/
public class ${resourceBundle.className} {
/**
* Singleton for the current user Locale's instance of ResourceBundle "${resourceBundle.bundleName}".
* @see ${resourceBundle.className}
*/
public static const INSTANCE: ${resourceBundle.className} = new ${resourceBundle.className}();
<#list props as property>
<#if property.keyIsIdentifier>
<#if property.comment??>
/**
${property.comment}
*/
public var ${property.key}: String;
public function ${resourceBundle.className}() {
<#list props as property>
<#if property.keyIsIdentifier>
${property.key}<#else><#if property.comment??>
/*
${property.comment}
*/
this["${property.key?json_string}"] = <#if property.valueIsReference>${property.value}<#else>"${property.value?json_string}";
}
}
}