de.upb.hni.vmagic.object
Class ArrayElement<T extends VhdlObject>

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.VhdlObject<T>
                  extended by de.upb.hni.vmagic.object.ForwardingVhdlObject<T>
                      extended by de.upb.hni.vmagic.object.ArrayElement<T>
Type Parameters:
T - the object type
All Implemented Interfaces:
Choice, NamedEntity, Target<T>, VhdlObjectProvider<T>

public class ArrayElement<T extends VhdlObject>
extends ForwardingVhdlObject<T>
implements Target<T>

Array element of a VhdlObject.


Nested Class Summary
 
Nested classes/interfaces inherited from class de.upb.hni.vmagic.expression.VhdlObject
VhdlObject.Mode, VhdlObject.ObjectClass
 
Constructor Summary
ArrayElement(T base, Expression... indices)
          Creates an array element.
ArrayElement(T base, Expression index)
          Creates an array element.
ArrayElement(T base, int index)
          Creates an array element with an integer index.
ArrayElement(T base, java.util.List<Expression> indices)
          Creates an array element.
 
Method Summary
 ArrayElement<T> getArrayElement(Expression... indices)
          Returns an array element of this object.
 ArrayElement<T> getArrayElement(Expression index)
          Returns an array element of this object.
 ArrayElement<T> getArrayElement(int index)
          Returns an array element of this object.
 ArrayElement<T> getArrayElement(java.util.List<Expression> indices)
          Returns an array element of this object.
 AttributeExpression<T> getAttributeExpression(Attribute attribute)
          Returns a attribute expression of this object.
 AttributeExpression<T> getAttributeExpression(Attribute attribute, Expression parameter)
          Returns a attribute expression of this object.
 java.util.List<Expression> getIndices()
          Returns the index.
 RecordElement<T> getRecordElement(java.lang.String element)
          Returns a record element of this object.
 Slice<T> getSlice(DiscreteRange range)
          Returns a slice of this vhdl object.
 
Methods inherited from class de.upb.hni.vmagic.object.ForwardingVhdlObject
getBase, getIdentifier, getMode, getObjectClass, getType, getVhdlObjects, setIdentifier, setMode, setType
 
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

ArrayElement

public ArrayElement(T base,
                    Expression index)
Creates an array element.

Parameters:
base - the base object
index - the array index

ArrayElement

public ArrayElement(T base,
                    int index)
Creates an array element with an integer index.

Parameters:
base - the base object
index - the array index

ArrayElement

public ArrayElement(T base,
                    java.util.List<Expression> indices)
Creates an array element.

Parameters:
base - the base object
indices - the array indices

ArrayElement

public ArrayElement(T base,
                    Expression... indices)
Creates an array element.

Parameters:
base - the base object
indices - the array indices
Method Detail

getIndices

public java.util.List<Expression> getIndices()
Returns the index.

Returns:
the index

getSlice

public Slice<T> getSlice(DiscreteRange range)
Returns a slice of this vhdl object.

Specified by:
getSlice in class VhdlObject<T extends VhdlObject>
Parameters:
range - the slice range.
Returns:
the slice

getArrayElement

public ArrayElement<T> getArrayElement(Expression index)
Returns an array element of this object.

Specified by:
getArrayElement in class VhdlObject<T extends VhdlObject>
Parameters:
index - the index of the array element
Returns:
the array element

getArrayElement

public ArrayElement<T> getArrayElement(int index)
Returns an array element of this object.

Specified by:
getArrayElement in class VhdlObject<T extends VhdlObject>
Parameters:
index - the index of the array element
Returns:
the array element

getArrayElement

public ArrayElement<T> getArrayElement(java.util.List<Expression> indices)
Returns an array element of this object.

Specified by:
getArrayElement in class VhdlObject<T extends VhdlObject>
Parameters:
indices - the indices of the array element
Returns:
the array element

getArrayElement

public ArrayElement<T> getArrayElement(Expression... indices)
Returns an array element of this object.

Specified by:
getArrayElement in class VhdlObject<T extends VhdlObject>
Parameters:
indices - the indices of the array element
Returns:
the array element

getRecordElement

public RecordElement<T> getRecordElement(java.lang.String element)
Returns a record element of this object.

Specified by:
getRecordElement in class VhdlObject<T extends VhdlObject>
Parameters:
element - the identifier of the record element
Returns:
the record element

getAttributeExpression

public AttributeExpression<T> getAttributeExpression(Attribute attribute)
Returns a attribute expression of this object.

Specified by:
getAttributeExpression in class VhdlObject<T extends VhdlObject>
Parameters:
attribute - the attribute
Returns:
the record element

getAttributeExpression

public AttributeExpression<T> getAttributeExpression(Attribute attribute,
                                                     Expression parameter)
Returns a attribute expression of this object.

Specified by:
getAttributeExpression in class VhdlObject<T extends VhdlObject>
Parameters:
attribute - the attribute
parameter - the parameter
Returns:
the record element