Package: com.multiversesocial.hyperview
Class: com.multiversesocial.hyperview.ObjectRegistry
Source: src/com/multiversesocial/hyperview/ObjectRegistry.java
Was going to make this Preferences Based but there are too amny damned quirks between different operating systems. Plus it forces base 64 endcoding which I don't want to have to do; I want it in binary.
public class ObjectRegistry implements ExternalizerConstants
| Declaration | Value / initializer | Description | Source |
|---|---|---|---|
public static HyperLinkedList listenerList | No comment in source; assigned in ObjectRegistry(); name appears in 3 other source file(s): HyperProcess, InterProcessMemory, PortInfo. | ||
static final byte majorVersion | = 1 | No comment in source; used in load(), save(). | |
static final int MAX_OBJECTS | = 255 | For sanity checking. Tweak to taste | |
static final byte minorVersion | = 3 | 3: OBJECT* nested schema (nestedFields) after lengths | |
public static ObjectRegistry registryBase | One Registry to rule them all. | ||
public static HyperLinkedList serializationList | No comment in source; assigned in ObjectRegistry(). | ||
String sourceURL | So each URL can have a different ObjectRegistry | ||
public static int totalObjectEntries | No comment in source; not referenced by name in this type’s methods. |
| Signature | Description | Source |
|---|---|---|
ObjectRegistry() | 2 statement(s); calls super(), ObjectRegistry.load(); creates HyperLinkedList. |
| Signature | Description | Source |
|---|---|---|
public static void addListener(Object tObject) | 3 statement(s); calls ObjectRegistry.listenerList.dlStore(); creates ObjectRegistryListenerNode, HyperLinkedList. | |
public void echo() | 6 statement(s); calls ObjectRegistry.getRegistry(). | |
public static String[] getClassList() | 11 statement(s); calls ObjectRegistry.getRegistry(). | |
public static ObjectRegistry getRegistry() | 2 statement(s); creates ObjectRegistry. | |
public static int getTotalObjects() | 2 statement(s); calls ObjectRegistry.getRegistry(). | |
public static HyperLinkedList load() | 40 statement(s); calls ObjectRegistry.getRegistry(), tSerializationList.drain(), System.getProperty(), System.getProperty("file.separator").charAt(), registryFile.exists() …; creates HyperLinkedList, File, FileInputStream. | |
public static void main(String[] args) | 2 statement(s); calls ObjectRegistry.getRegistry(), ob.echo(). | |
static ClassFieldLink readFieldSchema(InputStream in) throws IOException | 18 statement(s); calls readIntBE(), readFully(), readU8(), readNestedSchema(); creates java.io.IOException, ClassFieldLink, String. | |
static void readFully(InputStream in, byte[] b) throws IOException | 3 statement(s); calls in.read(); creates java.io.EOFException. | |
static int readIntBE(InputStream in) throws IOException | 5 statement(s); calls readU8(). | |
static void readNestedSchema(InputStream in, ClassFieldLink parent) throws IOException | Returns payload bytes for one instance of the nested schema (parent's array lengths not applied here when called for nested children; caller uses ClassFieldLink.fieldByteSize for totals). | |
static int readU8(InputStream in) throws IOException | Fixed 2026-09-24: EOF / short-read checks for ObjectRegistry.dat. | |
public static void remListener(Object tObject) | 4 statement(s); calls tListenerList.dlDelete(). | |
public static int remove(String tClassName) | 4 statement(s); calls ObjectRegistry.getRegistry(), ObjectRegistry.retrieve(), tRegistry.serializationList.dlDelete(), save(). | |
public static SerializationLink retrieve(String tClassName) | Returns ObjectRegistry.retrieve((HyperView)null, tClassName). | |
public static SerializationLink retrieve(HyperView tView, String tClassName) | 13 statement(s); calls ObjectRegistry.getRegistry(), tSerializationClassNameString.equals(), HyperView.hvForName(), tClassName.lastIndexOf(), tClassName.substring() …; creates HyperPop. | |
public static int save() | 28 statement(s); calls System.getProperty(), System.getProperty("file.separator").charAt(), outStream.write(), tSerializationLink.name.getBytes(), tClassFieldLink.name.getBytes() …; creates File, FileOutputStream, HyperPop. | |
public static int store(String tName, int tByteSize) | Returns ObjectRegistry.store((HyperView)null, (HyperLinkedList)null, tByteSize, tName). | |
public static int store(HyperView tView, HyperLinkedList tClassFieldList, long tByteSize, String tName) | 9 statement(s); calls registryBase.retrieve(), registryBase.serializationList.dlStore(), registryBase.save(), registryBase.serializationList.swap(); creates HyperPop, ObjectRegistry, SerializationLink. | |
static void writeFieldSchema(OutputStream out, ClassFieldLink f) throws IOException | 13 statement(s); calls f.name.getBytes(), writeIntBE(), out.write(), writeNestedSchema(). | |
static void writeIntBE(OutputStream out, int v) throws IOException | 4 statement(s); calls out.write(). | |
static void writeNestedSchema(OutputStream out, ClassFieldLink parent) throws IOException | Wire format minor>=3: after OBJECT* type (and array lengths), write nested field count + each nested ClassFieldLink recursively (same name/type/length layout as a top-level field). Empty nested list writes count 0 so a bare OBJECT still occupies 4 bytes of schema on disk (not payload). Added 2026-09-25. |
static call — Externalizer.java, line 304
304 HyperLinkedList tSerializationList = ObjectRegistry.load();
declaration — DataBasePane.java, line 9
9 ObjectRegistry objectRegistry;
static call — ObjectRegistryPane.java, line 37
37 String[] tString = ObjectRegistry.getClassList();