-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStringSymbol.java
More file actions
43 lines (36 loc) · 1.08 KB
/
StringSymbol.java
File metadata and controls
43 lines (36 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/**
* This file was automatically generated from StringSymbol.cs
* w/ further modifications by:
* @author Christoph M. Wintersteiger (cwinter)
**/
package com.microsoft.z3;
import com.microsoft.z3.enumerations.Z3_symbol_kind;
/**
* Named symbols
**/
public class StringSymbol extends Symbol
{
/**
* The string value of the symbol. <remarks>Throws an exception if the
* symbol is not of string kind.</remarks>
**/
public String getString() throws Z3Exception
{
return Native.getSymbolString(getContext().nCtx(), getNativeObject());
}
StringSymbol(Context ctx, long obj) throws Z3Exception
{
super(ctx, obj);
}
StringSymbol(Context ctx, String s) throws Z3Exception
{
super(ctx, Native.mkStringSymbol(ctx.nCtx(), s));
}
void checkNativeObject(long obj) throws Z3Exception
{
if (Native.getSymbolKind(getContext().nCtx(), obj) != Z3_symbol_kind.Z3_STRING_SYMBOL
.toInt())
throw new Z3Exception("Symbol is not of String kind");
super.checkNativeObject(obj);
}
}