de.upb.hni.vmagic.declaration
Class AttributeSpecification

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.AttributeSpecification
All Implemented Interfaces:
BlockDeclarativeItem, ConfigurationDeclarativeItem, DeclarativeItemMarker, EntityDeclarativeItem, PackageDeclarativeItem, ProcessDeclarativeItem, SubprogramDeclarativeItem

public class AttributeSpecification
extends DeclarativeItem
implements BlockDeclarativeItem, ConfigurationDeclarativeItem, EntityDeclarativeItem, PackageDeclarativeItem, ProcessDeclarativeItem, SubprogramDeclarativeItem

Attribute specification. An attribute specification is used to set an attribute of a named entity.

Example:
vMAGIC code:
Attribute attrib = new Attribute("ATTRIB", Standard.STRING);
AttributeSpecification s = new AttributeSpecification(attrib, EntityNameList.ALL,
    EntityClass.SIGNAL, new StringLiteral("value"));
VHDL output:
attribute ATTRIB of all : signal is "value";

Nested Class Summary
static class AttributeSpecification.EntityNameList
          Entity name list.
 
Constructor Summary
AttributeSpecification(Attribute attribute, AttributeSpecification.EntityNameList entities, EntityClass entityClass, Expression value)
          Creates an attribute specification.
 
Method Summary
 Attribute getAttribute()
          Returns the specified attribute.
 AttributeSpecification.EntityNameList getEntities()
          Returns the list of entities.
 EntityClass getEntityClass()
          Returns the entity class.
 Expression getValue()
          Returns the value.
 void setAttribute(Attribute attribute)
          Sets the specified attribute.
 void setEntities(AttributeSpecification.EntityNameList entities)
          Sets the list of entitites.
 void setEntityClass(EntityClass entityClass)
          Sets the entity class.
 void setValue(Expression value)
          Sets the value.
 
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

AttributeSpecification

public AttributeSpecification(Attribute attribute,
                              AttributeSpecification.EntityNameList entities,
                              EntityClass entityClass,
                              Expression value)
Creates an attribute specification.

Parameters:
attribute - the attribute
entities - the list of entity names
entityClass - the class of the entities
value - the value
Method Detail

getAttribute

public Attribute getAttribute()
Returns the specified attribute.

Returns:
the attribute

setAttribute

public void setAttribute(Attribute attribute)
Sets the specified attribute.

Parameters:
attribute - the attribute

getEntities

public AttributeSpecification.EntityNameList getEntities()
Returns the list of entities.

Returns:
a list of entities

setEntities

public void setEntities(AttributeSpecification.EntityNameList entities)
Sets the list of entitites.

Parameters:
entities - a list of entities

getEntityClass

public EntityClass getEntityClass()
Returns the entity class.

Returns:
the entity class

setEntityClass

public void setEntityClass(EntityClass entityClass)
Sets the entity class.

Parameters:
entityClass - the entity class

getValue

public Expression getValue()
Returns the value.

Returns:
the value

setValue

public void setValue(Expression value)
Sets the value.

Parameters:
value - the value