de.upb.hni.vmagic.declaration
Class FunctionDeclaration

java.lang.Object
  extended by de.upb.hni.vmagic.VhdlElement
      extended by de.upb.hni.vmagic.declaration.DeclarativeItem
          extended by de.upb.hni.vmagic.declaration.SubprogramDeclaration
              extended by de.upb.hni.vmagic.declaration.FunctionDeclaration
All Implemented Interfaces:
BlockDeclarativeItem, DeclarativeItemMarker, EntityDeclarativeItem, Function, PackageBodyDeclarativeItem, PackageDeclarativeItem, ProcessDeclarativeItem, SubprogramDeclarativeItem

public class FunctionDeclaration
extends SubprogramDeclaration
implements Function

Function declaration.


Constructor Summary
FunctionDeclaration(java.lang.String identifier, SubtypeIndication returnType, java.util.List<VhdlObjectProvider> parameters)
          Creates a function declaration.
FunctionDeclaration(java.lang.String identifier, SubtypeIndication returnType, VhdlObjectProvider... parameters)
          Creates a function declaration.
 
Method Summary
 java.lang.String getIdentifier()
          Returns the subprogram's identifier.
 java.util.List<VhdlObjectProvider<? extends VhdlObject>> getParameters()
          Returns the parameters of this subprogram.
 SubtypeIndication getReturnType()
          Returns the return type of this function.
 boolean isImpure()
          Returns if this function if impure.
 void setIdentifier(java.lang.String identifier)
          Sets the subprogram's identifier.
 void setImpure(boolean impure)
          Sets if this function should be impure.
 void setReturnType(SubtypeIndication returnType)
          Sets the return type of this function.
 
Methods inherited from class de.upb.hni.vmagic.declaration.SubprogramDeclaration
getIdentifier, getParameters, setIdentifier
 
Methods inherited from class de.upb.hni.vmagic.VhdlElement
getParent, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FunctionDeclaration

public FunctionDeclaration(java.lang.String identifier,
                           SubtypeIndication returnType,
                           VhdlObjectProvider... parameters)
Creates a function declaration.

Parameters:
identifier - the identifier
returnType - the return type
parameters - the parameters

FunctionDeclaration

public FunctionDeclaration(java.lang.String identifier,
                           SubtypeIndication returnType,
                           java.util.List<VhdlObjectProvider> parameters)
Creates a function declaration.

Parameters:
identifier - the identifier
returnType - the return type
parameters - the parameters
Method Detail

isImpure

public boolean isImpure()
Description copied from interface: Function
Returns if this function if impure.

Specified by:
isImpure in interface Function
Returns:
true, if this function is impure

setImpure

public void setImpure(boolean impure)
Description copied from interface: Function
Sets if this function should be impure.

Specified by:
setImpure in interface Function
Parameters:
impure - true, if this function should be impure

getReturnType

public SubtypeIndication getReturnType()
Description copied from interface: Function
Returns the return type of this function.

Specified by:
getReturnType in interface Function
Returns:
the return type

setReturnType

public void setReturnType(SubtypeIndication returnType)
Description copied from interface: Function
Sets the return type of this function.

Specified by:
setReturnType in interface Function
Parameters:
returnType - the return type

getIdentifier

public java.lang.String getIdentifier()
Returns the subprogram's identifier.

Specified by:
getIdentifier in interface NamedEntity
Returns:
the identifier

setIdentifier

public void setIdentifier(java.lang.String identifier)
Sets the subprogram's identifier.

Parameters:
identifier - the identifier

getParameters

public java.util.List<VhdlObjectProvider<? extends VhdlObject>> getParameters()
Returns the parameters of this subprogram.

Returns:
a modifiable list of objects