de.upb.hni.vmagic.expression
Class Aggregate

java.lang.Object
  extended by de.upb.hni.vmagic.VhdlElement
      extended by de.upb.hni.vmagic.expression.Expression
          extended by de.upb.hni.vmagic.expression.Primary
              extended by de.upb.hni.vmagic.expression.Aggregate
All Implemented Interfaces:
Choice, Target

public class Aggregate
extends Primary
implements Target

Aggregate.


Nested Class Summary
static class Aggregate.ElementAssociation
          An ElementAssociation associates choices with and expression.
 
Constructor Summary
Aggregate()
          Creates an empty aggregate.
Aggregate(Expression... expressions)
          Creates an aggregate that contains the given expressions.
Aggregate(java.util.List<Expression> expressions)
          Creates an aggregate that contains the given expressions.
 
Method Summary
 Aggregate.ElementAssociation createAssociation(Expression expression)
          Creates a new positional element association and adds it to this aggregate.
 Aggregate.ElementAssociation createAssociation(Expression expression, Choice... choices)
          Creates a new named element association and adds it to this aggregate.
 Aggregate.ElementAssociation createAssociation(Expression expression, java.util.List<Choice> choices)
          Creates a new named element association and adds it to this aggregate.
 java.util.List<Aggregate.ElementAssociation> getAssociations()
          Returns the associations.
 SubtypeIndication getType()
          Returns the type of this expression.
static Aggregate OTHERS(Expression expression)
          Creates a new aggregate of the type "(others => expression)".
 
Methods inherited from class de.upb.hni.vmagic.expression.Primary
getPrecedence
 
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

Aggregate

public Aggregate()
Creates an empty aggregate.


Aggregate

public Aggregate(Expression... expressions)
Creates an aggregate that contains the given expressions.

Parameters:
expressions - the epxressions

Aggregate

public Aggregate(java.util.List<Expression> expressions)
Creates an aggregate that contains the given expressions.

Parameters:
expressions - the epxressions
Method Detail

getAssociations

public java.util.List<Aggregate.ElementAssociation> getAssociations()
Returns the associations.

Returns:
the associations

createAssociation

public Aggregate.ElementAssociation createAssociation(Expression expression)
Creates a new positional element association and adds it to this aggregate.

Parameters:
expression - the expression
Returns:
the created element association

createAssociation

public Aggregate.ElementAssociation createAssociation(Expression expression,
                                                      java.util.List<Choice> choices)
Creates a new named element association and adds it to this aggregate.

Parameters:
expression - the expression
choices - the choices
Returns:
the created element association

createAssociation

public Aggregate.ElementAssociation createAssociation(Expression expression,
                                                      Choice... choices)
Creates a new named element association and adds it to this aggregate.

Parameters:
expression - the expression
choices - the choices
Returns:
the created element association

getType

public SubtypeIndication getType()
Description copied from class: Expression
Returns the type of this expression.

Specified by:
getType in class Expression
Returns:
the type of this expression

OTHERS

public static Aggregate OTHERS(Expression expression)
Creates a new aggregate of the type "(others => expression)".

Parameters:
expression - the expression
Returns:
the created aggregate