de.upb.hni.vmagic.literal
Class BinaryLiteral

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.Literal
                  extended by de.upb.hni.vmagic.literal.BinaryLiteral
All Implemented Interfaces:
Choice

public class BinaryLiteral
extends Literal

Binary literal.


Constructor Summary
BinaryLiteral(int value, int width)
          Creates a binary literal by converting a integer.
BinaryLiteral(java.lang.String value)
          Creates a binary literal.
 
Method Summary
 SubtypeIndication getType()
          Returns the type of this expression.
 java.lang.String toString()
           
 
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, wait, wait, wait
 

Constructor Detail

BinaryLiteral

public BinaryLiteral(java.lang.String value)
Creates a binary literal.

Parameters:
value - the value

BinaryLiteral

public BinaryLiteral(int value,
                     int width)
Creates a binary literal by converting a integer.

Parameters:
value - the integer value
width - the width of the binary literal in bits
Method Detail

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

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object