All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.templates._attribute_accessors.ftl Maven / Gradle / Ivy

The newest version!

<#if attribute.aliasFor?exists>
     <#assign propertyKey=attribute.aliasFor>
<#else>
     <#assign propertyKey=attribute.name>

<#if utils.isKeyword(propertyKey) >
     <#assign propertyKey>${propertyKey}Value

 
    public ${attribute.typeName} ${attribute.getterName}() {
        <#if attribute.bindingAttribute || attribute.literal >
        ${attribute.typeForCasting} value = (${attribute.typeForCasting}) getStateHelper().get(Properties.${propertyKey});
        <#else>
        ${attribute.typeForCasting} value = (${attribute.typeForCasting}) getStateHelper().eval(Properties.${propertyKey}<#if attribute.defaultValue?exists>, ${attribute.defaultValue});
        
        return value;
    }
    
<#if ! attribute.readOnly >
    public void ${attribute.setterName}(${attribute.typeName} ${propertyKey}) {
        getStateHelper().put(Properties.${propertyKey}, ${propertyKey});
        <#if attribute.passThrough >
        handleAttribute("${attribute.name}",${propertyKey});
        
    }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy