mirror of
https://github.com/Z3Prover/z3
synced 2025-04-15 13:28:47 +00:00
44 lines
1.1 KiB
Java
44 lines
1.1 KiB
Java
/**
|
|
* 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.*;
|
|
|
|
/**
|
|
* 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 String() throws Z3Exception
|
|
{
|
|
return Native.getSymbolString(Context().nCtx(), NativeObject());
|
|
}
|
|
|
|
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(Context().nCtx(), obj) != Z3_symbol_kind.Z3_STRING_SYMBOL
|
|
.toInt())
|
|
throw new Z3Exception("Symbol is not of String kind");
|
|
|
|
super.CheckNativeObject(obj);
|
|
}
|
|
}
|