Class JavaExprPrinter
- java.lang.Object
-
- ru.ispras.fortress.expression.printer.MapBasedPrinter
-
- ru.ispras.fortress.expression.printer.JavaExprPrinter
-
- All Implemented Interfaces:
ExprTreePrinter
public class JavaExprPrinter extends MapBasedPrinter
This class implements an expression printer that produces Java code.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
JavaExprPrinter.Visitor
-
Nested classes/interfaces inherited from class ru.ispras.fortress.expression.printer.MapBasedPrinter
MapBasedPrinter.ExprTreeVisitor
-
-
Constructor Summary
Constructors Constructor Description JavaExprPrinter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
bigIntegerToString(java.math.BigInteger value)
Converts the specified integer value into a Java-format textual representation.static java.lang.String
bitVectorToString(BitVector value)
Converts the specified bit vector into a Java-format textual representation.static java.lang.String
integerToString(java.math.BigInteger value)
Converts the specified integer value into a Java-format textual representation.-
Methods inherited from class ru.ispras.fortress.expression.printer.MapBasedPrinter
addMapping, addMapping, addMapping, addMapping, addMapping, addMapping, addMapping, addMapping, addMapping, getOperationDescription, setVisitor, toString
-
-
-
-
Method Detail
-
bitVectorToString
public static java.lang.String bitVectorToString(BitVector value)
Converts the specified bit vector into a Java-format textual representation.- Parameters:
value
-BitVector
object to be converted.- Returns:
- Java-format textual representation of the bit vector.
- Throws:
java.lang.IllegalArgumentException
- if the argument isnull
.
-
integerToString
public static java.lang.String integerToString(java.math.BigInteger value)
Converts the specified integer value into a Java-format textual representation. The exact format of the result depends on the size of the integer value. It can be printed asint
,long
orBigInteger
.- Parameters:
value
-BigInteger
object to be converted.- Returns:
- Java-format textual representation of the integer value.
- Throws:
java.lang.IllegalArgumentException
- if the argument isnull
.
-
bigIntegerToString
public static java.lang.String bigIntegerToString(java.math.BigInteger value)
Converts the specified integer value into a Java-format textual representation. The result is represented by a decimalBigInteger
object.- Parameters:
value
-BigInteger
object to be converted.- Returns:
- Java-format textual representation of the
BigInteger
object. - Throws:
java.lang.IllegalArgumentException
- if the argument isnull
.
-
-