blob: 3e38584b4300bc0ce09312738ae987027a8e97f7 [file] [log] [blame]
## Copyright 2007-2008 Cisco Systems Inc.
##
## Licensed under the Apache License, Version 2.0 (the "License"); you may not
## use this file except in compliance with the License. You may obtain a copy
## of the License at
##
## http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
## WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
## License for the specific language governing permissions and limitations
## under the License.
// This file automatically generated by:
// $version
// $now
// This file is automatically created and should not be edited!
package $intf.parent().name();
#if( !$hasBaseClass )
import java.io.Serializable;
#end
#foreach( $n in $intf.iterator() )
#if ($n.isExtern())
#if ($n.hasImport( $helper ))
import $n.getImport( $helper );
#end
#end
#end
#if ($intf.hasDescr())
/**
#foreach( $s in $intf.descr() )
* $s
#end
*/
#end
@SuppressWarnings("unused")
#set ($sep = "extends")
#if ($hasBaseClass)
public interface $intf.name()$suffix $sep $intf.name()
#set ($sep = ",")
#else
public interface $intf.name()$suffix
#end
#foreach( $n in $intf.iterator() )
#if ($n.isMixin())
$sep $n.fqname()$suffix
#set ($sep = ",")
#end
#end
{
#if (!$intf.hasMessageDirection($mc))
// no $mc direction items defined.
#end
#foreach( $n in $intf.iterator() )
#if ($n.isMessage())
#if ($n.isMsgDir($mc))
#if (!$n.isHidden())
/**
#foreach( $s in $n.descr() )
* $s
#end
#foreach( $p in $n.iterator() )
#set($first = true)
#foreach( $s in $p.descr() )
#if ($first)
#set($first = false)
* @param $p.name() $s
#else
* $s
#end
#end
#end
#if ($n.hasReturn())
#set($first = true)
#foreach( $s in $n.returnDescr() )
#if ($first)
#set($first = false)
* @return $s
#else
* $s
#end
#end
#end
#foreach($t in $n.thrown().iterator())
#set($first = true)
#foreach( $s in $t.descr() )
#if ($first)
#set($first = false)
* @throws $t.name() $s
#else
* $s
#end
#end
#end
*/
public $helper.getTypeName( $n.type() ) $n.name()(
#set( $sep = "" )
#foreach( $p in $n.iterator() )
$sep$helper.getTypeName( $p.type() ) $p.name()
#set( $sep = ", " )
#end
)
#if ($n.hasThrown())
throws
#set( $sep = "" )
#foreach($t in $n.thrown().iterator())
$sep$t.getNamed().fqname()
#set( $sep = ", " )
#end
#end
;
#end
#end
#elseif ($n.isConstant())
#if (!$hasBaseClass)
#if ($n.hasDescr())
/**
#foreach( $s in $n.descr() )
* $s
#end
*/
#end
public $helper.getNativeTypeName( $n.type() ) $n.name() = $helper.getTypeValue( $n.type(), $n.value() );
#end
#elseif ($n.isEnumx())
#if (!$hasBaseClass)
#if ($n.hasDescr())
/**
#foreach( $s in $n.descr() )
* $s
#end
*/
#end
public enum $n.name()
{
#set( $sep = "" )
#foreach( $i in $n.iterator() )
/**
#foreach( $s in $i.descr() )
* $s
#end
*/
$sep$i.name()
#set( $sep = ", " )
#end
}
#end
#elseif ($n.isExtern())
## ignore extern
#elseif ($n.isMixin())
## ignore mixin
#elseif ($n.isStruct() || $n.isExcept())
#if (!$hasBaseClass)
#if ($n.hasDescr())
/**
#foreach( $s in $n.descr() )
* $s
#end
*/
#end
@SuppressWarnings("serial")
public class $n.name()
#if( $n.hasExtends() )
extends $n.getExtends().name()
#else
#if( $n.isExcept() )
#if( $n.isUnchecked() )
extends RuntimeException
#else
extends Exception
#end
#else
implements Serializable
#end
#end
{
/**
* Constructs the $n.name(). Don't init any fields.
*/
public $n.name()()
{
// don't init any fields.
}
#if ($n.hasAnyParameters())
/**
* Constructs the $n.name().
#foreach( $i in $n.getAllParameters() )
#set( $sep = "@param " )
#foreach( $s in $i.descr() )
* $sep$i.name() $s
#set( $sep = "" )
#end
#end
*/
public $n.name()
(
#set( $sep = "" )
#foreach( $i in $n.getAllParameters() )
$sep$helper.getTypeName( $i.type() ) $i.name()
#set( $sep = ", " )
#end
)
{
#if( $n.hasExtends() )
super
(
#set( $sep = "" )
#foreach( $i in $n.getExtends().getAllParameters() )
$sep$i.name()
#set( $sep = ", " )
#end
);
#end
#foreach( $i in $n.getParameters() )
this.$i.name() = $i.name();
#end
}
#end
#if( $n.isExcept() )
@Override
public String getMessage()
{
return $helper.formatString( $n, true );
}
#else
@Override
public String toString()
{
return $helper.formatString( $n, false );
}
#end
#foreach( $i in $n.iterator() )
#if( $i.hasDescr())
/**
#foreach( $s in $i.descr() )
* $s
#end
*/
#end
public $helper.getTypeName( $i.type() ) $i.name();
/**
* Gets the value.
*
#foreach( $s in $i.descr() )
* $s
#end
*
* @return the value.
*/
public $helper.getTypeName( $i.type() ) $helper.getGetterName( $i.name() )()
{
return $i.name();
}
/**
* Sets the value.
*
#foreach( $s in $i.descr() )
* $s
#end
*
* @param value the value.
*/
public void $helper.getSetterName( $i.name() )( $helper.getTypeName( $i.type() ) value )
{
this.$i.name() = value;
}
#end
}
#end
#elseif ($n.isBuiltin())
## nothing to do.
#else
*** intf.vm: don't know what to do with $n ***
#end
#end
}