Class StringEquals
- java.lang.Object
-
- it.unive.lisa.symbolic.value.operator.binary.StringOperation
-
- it.unive.lisa.symbolic.value.operator.binary.StringEquals
-
- All Implemented Interfaces:
Operator
,BinaryOperator
,StringOperator
public class StringEquals extends StringOperation
Given two expressions that both evaluate to string values, aBinaryExpression
using this operator checks if the string from the first argument is equal (in terms of contents, that is different fromComparisonEq
) to the one of the second argument.
First argument expression type:StringType
Second argument expression type:StringType
Computed expression type:BooleanType
-
-
Field Summary
Fields Modifier and Type Field Description static StringEquals
INSTANCE
The singleton instance of this class.
-
Constructor Summary
Constructors Modifier Constructor Description protected
StringEquals()
Builds the type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Type
resultType(TypeSystem types)
Yields theType
of this operation's result.java.lang.String
toString()
-
Methods inherited from class it.unive.lisa.symbolic.value.operator.binary.StringOperation
typeInference
-
-
-
-
Field Detail
-
INSTANCE
public static final StringEquals INSTANCE
The singleton instance of this class.
-
-
Constructor Detail
-
StringEquals
protected StringEquals()
Builds the type. This constructor is visible to allow subclassing: instances of this class should be unique, and the singleton can be retrieved through fieldINSTANCE
.
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
resultType
protected Type resultType(TypeSystem types)
Description copied from class:StringOperation
Yields theType
of this operation's result.- Specified by:
resultType
in classStringOperation
- Parameters:
types
- the type system knowing about the types of the currentprogram- Returns:
- the type
-
-