de.upb.hni.vmagic.declaration
Class SubprogramBody

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.SubprogramBody
All Implemented Interfaces:
BlockDeclarativeItem, DeclarativeItemMarker, EntityDeclarativeItem, PackageBodyDeclarativeItem, ProcessDeclarativeItem, SubprogramDeclarativeItem, DeclarativeRegion
Direct Known Subclasses:
FunctionBody, ProcedureBody

public abstract class SubprogramBody
extends DeclarativeItem
implements BlockDeclarativeItem, EntityDeclarativeItem, PackageBodyDeclarativeItem, ProcessDeclarativeItem, SubprogramDeclarativeItem, DeclarativeRegion

Abstract base class for subprogram bodies.


Constructor Summary
SubprogramBody(java.lang.String identifier, java.util.List<VhdlObjectProvider> parameters)
          Creates a subprogram body.
SubprogramBody(java.lang.String identifier, VhdlObjectProvider... parameters)
          Creates a subprogram body.
SubprogramBody(SubprogramDeclaration declaration)
          Creates a subprogram body based on a subprogram declaration.
 
Method Summary
 java.util.List<SubprogramDeclarativeItem> getDeclarations()
          Returns the declarations.
 java.lang.String getIdentifier()
          Returns the subprogram's identifier.
 java.util.List<VhdlObjectProvider<? extends VhdlObject>> getParameters()
          Returns the parameters of this subprogram.
 Scope getScope()
          Returns the scope of this declarative region.
 java.util.List<SequentialStatement> getStatements()
          Returns the statements.
 void setIdentifier(java.lang.String identifier)
          Sets the subprogram's identifier.
 
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

SubprogramBody

public SubprogramBody(java.lang.String identifier,
                      VhdlObjectProvider... parameters)
Creates a subprogram body.

Parameters:
identifier - the identifier of this subprogram body
parameters - the parameters

SubprogramBody

public SubprogramBody(java.lang.String identifier,
                      java.util.List<VhdlObjectProvider> parameters)
Creates a subprogram body.

Parameters:
identifier - the identifier of this subprogram body
parameters - the parameters

SubprogramBody

public SubprogramBody(SubprogramDeclaration declaration)
Creates a subprogram body based on a subprogram declaration.

Parameters:
declaration - the subprogam declaration
Method Detail

getIdentifier

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

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

getDeclarations

public java.util.List<SubprogramDeclarativeItem> getDeclarations()
Returns the declarations.

Returns:
a modifiable list of subprogram declarative items

getStatements

public java.util.List<SequentialStatement> getStatements()
Returns the statements.

Returns:
a modifiable list of sequential statements

getScope

public Scope getScope()
Description copied from interface: DeclarativeRegion
Returns the scope of this declarative region.

Specified by:
getScope in interface DeclarativeRegion
Returns:
the scope