de.upb.hni.vmagic.type
Class EnumerationType

java.lang.Object
  extended by de.upb.hni.vmagic.VhdlElement
      extended by de.upb.hni.vmagic.type.Type
          extended by de.upb.hni.vmagic.type.EnumerationType
All Implemented Interfaces:
BlockDeclarativeItem, DeclarativeItemMarker, EntityDeclarativeItem, PackageBodyDeclarativeItem, PackageDeclarativeItem, ProcessDeclarativeItem, SubprogramDeclarativeItem, NamedEntity, SubtypeIndication

public class EnumerationType
extends Type

Enumeration type.


Constructor Summary
EnumerationType(java.lang.String identifier)
          Creates an empty enumeration type.
EnumerationType(java.lang.String identifier, char... literals)
          Creates a enumeration type with the given character literals.
EnumerationType(java.lang.String identifier, java.lang.String... literals)
          Creates a enumeration type with the given identifier literals.
 
Method Summary
 EnumerationLiteral createLiteral(char literal)
          Creates a character enumeration literal and adds it to this literal.
 EnumerationLiteral createLiteral(java.lang.String literal)
          Creates a identifier enumeration literal and adds it to this literal.
 java.util.List<EnumerationLiteral> getLiterals()
          Returns the literals.
 
Methods inherited from class de.upb.hni.vmagic.type.Type
getIdentifier, 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

EnumerationType

public EnumerationType(java.lang.String identifier)
Creates an empty enumeration type.

Parameters:
identifier - the identifier

EnumerationType

public EnumerationType(java.lang.String identifier,
                       java.lang.String... literals)
Creates a enumeration type with the given identifier literals.

Parameters:
identifier - the identifier of this enumeration type
literals - the identifier literals

EnumerationType

public EnumerationType(java.lang.String identifier,
                       char... literals)
Creates a enumeration type with the given character literals.

Parameters:
identifier - the identifier of this enumeration type
literals - the character literals
Method Detail

getLiterals

public java.util.List<EnumerationLiteral> getLiterals()
Returns the literals.

Returns:
a modifiable list of enumeration literals

createLiteral

public EnumerationLiteral createLiteral(char literal)
Creates a character enumeration literal and adds it to this literal.

Parameters:
literal - the literal value
Returns:
the created enumeration literal

createLiteral

public EnumerationLiteral createLiteral(java.lang.String literal)
Creates a identifier enumeration literal and adds it to this literal.

Parameters:
literal - the literal value
Returns:
the created enumeration literal