aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/java/com/libmailcore/NativeObject.java
blob: d90b728319f90933343463847fe69196ff693aeb (plain)
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
package com.libmailcore;

import java.util.Map;

public class NativeObject implements Cloneable {
    protected void finalize() throws Throwable
    {
        super.finalize();
        unsetupNative();
    }

    protected native void initWithNative(long nativeHandle);
    private native void unsetupNative();
    public native String toString();
    public native Object clone() throws CloneNotSupportedException;
    
    protected native Map serializable();
    public static native NativeObject objectWithSerializable(Map serializable);

    private long nativeHandle;
    
    static {
        MainThreadUtils.singleton();
    }
}