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

templates.java.Interface.vsl Maven / Gradle / Ivy

Go to download

Produces generic Java code, such as: value objects, enumerations, exceptions, interfaces, etc.

The newest version!
#if ($umlUtils.shouldOutput($interface))
// license-header java merge-point
/* Autogenerated by AndroMDA Java cartridge (Interface.vsl) - do not edit */
#if ($stringUtils.isNotBlank($interface.packageName))
package $interface.packageName;
#end

/**
$interface.getDocumentation(" * ")
 */
public interface $interface.name
#if (!$interface.allGeneralizations.empty)
    extends $interface.generalizationList
#elseif ($serializable)
    extends java.io.Serializable
#end
{

#if (!$interface.attributes.empty)
    // Interface Attributes

#end
#foreach($attribute in $interface.attributes)
#if ($attribute.visibility == "public")
#if ($attribute.static)
    /**
$attribute.getDocumentation("     * ")
     */
    public static final $attribute.getterSetterTypeName $attribute.name = $attribute.defaultValue;
#else
    /**
$attribute.getDocumentation("     * ")
     * @return $attribute.getterSetterTypeName
     */
    public $attribute.getterSetterTypeName ${attribute.getterName}();
#if (!$attribute.readOnly)

    /**
$attribute.getDocumentation("     * ")
     * @param $attribute.name $attribute.getterSetterTypeName
#if($generateChainedSetters)
     * @return ${interface.name} this
#end
     */
    public#if($generateChainedSetters) ${interface.name}#else void#end ${attribute.setterName}($attribute.getterSetterTypeName $attribute.name);
#end
#end

#end
#end
#if (!$interface.navigableConnectingEnds.empty)
    // Interface AssociationEnds

#end
#foreach ($associationEnd in $interface.associationEnds)
#set ($target = $associationEnd.otherEnd)
#if ($target.navigable)
    /**
     * Get the $target.name
$target.getDocumentation("     * ")
     * @return $target.getterSetterTypeName
     */
    public $target.getterSetterTypeName ${target.getterName}();

    /**
     * Set the $target.name
     * @param $target.name $target.getterSetterTypeName
#if($generateChainedSetters)
     * @return ${interface.name} this
#end
     */
    public#if($generateChainedSetters) ${interface.name}#else void#end ${target.setterName}($target.getterSetterTypeName $target.name);

#end
#end
#if (!$interface.operations.empty)
    // Interface Operations

#end
#foreach ($operation in $interface.operations)
#if ($operation.visibility == "public")
#set ($returnType = $operation.getterSetterReturnTypeName)
    /**
$operation.getDocumentation("     * ")
#foreach ($argument in $operation.arguments)
     * @param $argument.name $argument.getDocumentation("")
#end
#if ($operation.returnTypePresent)
     * @return $returnType
#end
#foreach ($exception in $operation.exceptions)
     * @throws $exception.name $exception.getDocumentation("")
#end
     */
#if ($operation.exceptionsPresent)
    public $returnType $operation.signature
        throws $operation.exceptionList;
#else
    public $returnType $operation.signature;
#end

#end
#end
}
#end




© 2015 - 2025 Weber Informatics LLC | Privacy Policy