3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-01-17 07:56:24 +00:00
z3/src/api/java/ConstructorList.java
George Karpenkov 22ffd65d1e Java API: split incRef into incRef and addToReferenceQueue
One method should do one thing only, it's easy to mix things up
otherwise.
2016-06-12 21:01:58 +02:00

46 lines
839 B
Java

/**
Copyright (c) 2012-2014 Microsoft Corporation
Module Name:
ConstructorList.java
Abstract:
Author:
@author Christoph Wintersteiger (cwinter) 2012-03-15
Notes:
**/
package com.microsoft.z3;
/**
* Lists of constructors
**/
public class ConstructorList extends Z3Object {
ConstructorList(Context ctx, long obj)
{
super(ctx, obj);
}
@Override
void incRef() {
// Constructor lists are not reference counted.
}
@Override
void addToReferenceQueue() {
getContext().getConstructorListDRQ().storeReference(getContext(), this);
}
ConstructorList(Context ctx, Constructor[] constructors)
{
super(ctx, Native.mkConstructorList(ctx.nCtx(),
constructors.length,
Constructor.arrayToNative(constructors)));
}
}