mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-15 17:33:38 +00:00
Make Java classes corresponding to Mercury types automatically serialisable.
Branches: main
Make Java classes corresponding to Mercury types automatically serialisable.
java/runtime/MercuryType.java:
Make MercuryType extend java.io.Serializable.
compiler/mlds_to_java.m:
java/runtime/MercuryEnum.java:
Add a MercuryEnum interface which is implemented by classes
corresponding to Mercury enumerations. Previously enumerations
didn't implement MercuryType.
compiler/ml_type_gen.m:
Make enumeration classes implement MercuryType and MercuryEnum.
library/builtin.m:
Make builtin.copy check for MercuryEnum instead of relying on
enumeration classes not to implement MercuryType. This is not
strictly necessary but avoids copying instances of enumeration
classes.
This commit is contained in:
13
java/runtime/MercuryEnum.java
Normal file
13
java/runtime/MercuryEnum.java
Normal file
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// Copyright (C) 2009 The University of Melbourne.
|
||||
// This file may only be copied under the terms of the GNU Library General
|
||||
// Public License - see the file COPYING.LIB in the Mercury distribution.
|
||||
//
|
||||
// This interface is implemented by all classes generated by the Java back-end
|
||||
// which correspond to Mercury-defined enumeration types.
|
||||
//
|
||||
|
||||
package jmercury.runtime;
|
||||
|
||||
public interface MercuryEnum {
|
||||
}
|
||||
Reference in New Issue
Block a user