-
Notifications
You must be signed in to change notification settings - Fork 60
Expand file tree
/
Copy pathPyEllipsis.java
More file actions
36 lines (28 loc) · 985 Bytes
/
Copy pathPyEllipsis.java
File metadata and controls
36 lines (28 loc) · 985 Bytes
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
// Copyright (c) Corporation for National Research Initiatives
package org.python.core;
import java.io.Serializable;
import org.python.expose.ExposedNew;
import org.python.expose.ExposedType;
/**
* A class representing the singleton Ellipsis <code>...</code> object.
*/
@Untraversable
@ExposedType(name = "ellipsis", base = PyObject.class, isBaseType = false)
public class PyEllipsis extends PySingleton implements Serializable {
public static final PyType TYPE = PyType.fromClass(PyEllipsis.class);
private static PyEllipsis INST = new PyEllipsis();
private PyEllipsis() {
super(TYPE, "Ellipsis");
}
@ExposedNew
final static PyObject ellipsis_new(PyNewWrapper new_, boolean init, PyType subtype,
PyObject[] args, String[] keywords) {
return INST;
}
public static PyEllipsis getInstance() {
return INST;
}
private Object writeReplace() {
return new Py.SingletonResolver("Ellipsis");
}
}