Package: com.multiversesocial.hyperview
Class: com.multiversesocial.hyperview.Externalizer
Source: src/com/multiversesocial/hyperview/Externalizer.java

Externalizer

HyperView V3.2 — class
version V3.2 class

Summary

The purpose of this class is to make lists of primitives and generate the data move source code in 'C' java.

Source file: Externalizer.java

Hierarchy

Extends: BasicPane

Implements: ExternalizerConstants

Referenced HyperView classes

Media files used

Declaration & members

public class Externalizer extends BasicPane implements ExternalizerConstants

Declared in src/com/multiversesocial/hyperview/Externalizer.java, lines 11–2715. 72 field(s), 2 constructor(s), 24 method(s), plus 13 nested type(s). Every member has an anchor you can link to (e.g. Externalizer.html#<id>).

Fields (72)

DeclarationValue / initializerDescriptionSource
Gadget abortGadgetNo comment in source; assigned in Externalizer().line 69
Gadget abortSaveGadgetNo comment in source; not referenced by name in this type’s methods.line 86
Gadget addGadgetNo comment in source; assigned in Externalizer().line 66
Color asterixColorNo comment in source; assigned in Externalizer(); used in updateClassFieldList().line 51
static final String asterixString= "*" (constant)No comment in source; used in updateClassFieldList().line 19
int bufferSizeNo comment in source; assigned in Externalizer().line 13
Color[] buttonBottomColorNo comment in source; assigned in Externalizer(); used in update().line 54
Color[] buttonColorNo comment in source; assigned in Externalizer(); used in update().line 52
Color buttonSelectedColorNo comment in source; assigned in Externalizer(); used in update().line 55
Color[] buttonTopColorNo comment in source; assigned in Externalizer(); used in update().line 53
GetString classNameStringNo comment in source; assigned in Externalizer().line 68
static final int CLASSTRING_X= 20 (constant)No comment in source; used in Externalizer(), update().line 27
static final int CLASSTRING_Y= 139 (constant)No comment in source; used in Externalizer(), update().line 28
RadioButton cSourceNo comment in source; not referenced by name in this type’s methods.line 80
int currentColumnNo comment in source; assigned in Externalizer(), onClick().line 46
int currentFieldNo comment in source; assigned in Externalizer(); used in updateClassFieldList(), tryAddNestedToSelected().line 48
int currentFieldPaneNo comment in source; assigned in Externalizer().line 49
int currentOffsetNo comment in source; name appears in 1 other source file(s): TextPane.line 14
int currentTypeNo comment in source; assigned in Externalizer(), onClick(); used in update(), promptNestedType(), tryAddNestedToSelected().line 47
static final String DEF_STRING= "" (constant)No comment in source; not referenced by name in this type’s methods.line 22
static final String[] externaliazableOptimumBinaryString= {" java.io.externaliazable ", " Optimal Binary "}No comment in source; not referenced by name in this type’s methods.line 18
static final int FIELD_NUMBER_RECT_HEIGHT= 14 (constant)
source: STRING_HEIGHT
No comment in source; used in updateClassFieldList().line 35
static final int FIELD_NUMBER_RECT_WIDTH= 100 (constant)No comment in source; used in updateClassFieldList().line 34
static final int FIELD_NUMBER_RECT_X= 108 (constant)
source: FIELD_NUMBER_X - 2
No comment in source; used in updateClassFieldList().line 32
static final int FIELD_NUMBER_RECT_Y= 7 (constant)
source: FIELD_NUMBER_Y - STRING_HEIGHT + 1
No comment in source; used in updateClassFieldList().line 33
static final int FIELD_NUMBER_X= 110 (constant)No comment in source; used in updateClassFieldList().line 29
static final int FIELD_NUMBER_Y= 20 (constant)No comment in source; used in updateClassFieldList().line 30
static final int FIELD_PANE_HEIGHT= 282 (constant)
source: STRING_HEIGHT * FIELD_VIEW_MAX + 2
No comment in source; used in updateClassFieldList().line 41
static final int FIELD_PANE_WIDTH= 446 (constant)
source: WIDTH - 15
No comment in source; used in onClick(), updateClassFieldList().line 40
static final int FIELD_PANE_X= 7 (constant)
source: FIELD_X - 1
No comment in source; used in updateClassFieldList().line 42
static final int FIELD_PANE_Y= 146 (constant)
source: FIELD_Y - STRING_HEIGHT
No comment in source; used in updateClassFieldList().line 43
static final int FIELD_VIEW_MAX= 20 (constant)No comment in source; used in updateClassFieldList().line 37
static final int FIELD_X= 8 (constant)No comment in source; used in updateClassFieldList().line 38
static final int FIELD_Y= 160 (constant)No comment in source; used in updateClassFieldList().line 39
HyperLinkedList fieldListNo comment in source; assigned in Externalizer(); used in updateClassFieldList(), fieldAt().line 56
String[] fieldNameStringNo comment in source; assigned in Externalizer().line 61
int fieldNumberNo comment in source; used in Externalizer().line 71
Gadget generateGadgetNo comment in source; assigned in Externalizer().line 65
static final int HEIGHT= 400 (constant)No comment in source; used in Externalizer(); name appears in 1 other source file(s): HyperView.line 21
RadioGroup jhExternNo comment in source; not referenced by name in this type’s methods.line 84
RadioButton jSourceNo comment in source; not referenced by name in this type’s methods.line 81
Gadget loadGadgetNo comment in source; assigned in Externalizer().line 63
static final int MAX_FIELDS= 116 (constant)No comment in source; used in promptNestedFields().line 23
HyperNumberPop numberPopNo comment in source; assigned in update().line 73
byte[] outBufferNo comment in source; assigned in Externalizer().line 15
ByteBuffer outByteBufferNo comment in source; not referenced by name in this type’s methods.line 16
GetString outFileGetStringGadget referencesfor Generate SourcePopupline 78
RadioGroup pgsGroupNo comment in source; not referenced by name in this type’s methods.line 83
RadioButton pointerGlobalStackButtonNo comment in source; not referenced by name in this type’s methods.line 82
static final String[] pointerGlobalStackString= {"Pointer", "Global", "Stack"}No comment in source; not referenced by name in this type’s methods.line 17
BasicPane popPaneNo comment in source; not referenced by name in this type’s methods.line 79
HyperBoolPop registrySavePopNo comment in source; not referenced by name in this type’s methods.line 62
Gadget remGadgetNo comment in source; assigned in Externalizer().line 67
Gadget saveFileGadgetNo comment in source; not referenced by name in this type’s methods.line 85
Gadget saveGadgetNo comment in source; assigned in Externalizer().line 64
HyperScrollbar scrollBarNo comment in source; assigned in Externalizer(); used in updateClassFieldList().line 57
static final int STRING_HEIGHT= 14 (constant)No comment in source; used in Externalizer(), update(), updateClassFieldList().line 26
static final int STRING_WIDTH= 90 (constant)No comment in source; used in Externalizer(), update(), updateClassFieldList().line 25
StringBuilder stringBuilderNo comment in source; assigned in Externalizer(), updateClassFieldList().line 74
HyperStringPop stringPopNo comment in source; assigned in Externalizer().line 72
Thread task= nullNo comment in source; not referenced by name in this type’s methods.line 44
static final int TOTAL_COLUMNS= 4 (constant)No comment in source; used in Externalizer(), update().line 24
static final int TOTAL_TYPES= typeString.lengthNo comment in source; used in Externalizer(), onClick(), update(); name appears in 1 other source file(s): ExternalizerConstants.line 60
int totalColumnsNo comment in source; assigned in Externalizer(); used in onClick().line 45
static final String[] typeString= ExternalizerConstants.TYPE_STRING2No comment in source; used in Externalizer(), update(), nestedSummary(), promptNestedType(), tryAddNestedToSelected().line 59
int[] typeX2LocsNo comment in source; assigned in Externalizer(); used in onClick().line 50
int[] typeXLocsNo comment in source; assigned in Externalizer(); used in onClick(), update().line 50
int[] typeY2LocsNo comment in source; assigned in Externalizer(); used in onClick().line 50
int[] typeYLocsNo comment in source; assigned in Externalizer(); used in onClick(), update().line 50
static final String VERSION= "EXT:V1.122" (constant)No comment in source; used in Externalizer(); name appears in 1 other source file(s): SerialPane.line 58
static final int WIDTH= 461 (constant)No comment in source; used in Externalizer(); name appears in 1 other source file(s): HyperView.line 20

Constructors (2)

SignatureDescriptionSource
Externalizer(HyperView tView)119 statement(s); calls super(), move(), curView.setTitle(), graphics.setFont(), graphics.setColor() …; creates StringBuilder, Color, Gadget.line 88
Externalizer(Externalizer parentExternalizer)1 statement(s); calls super().line 344

Methods (24)

SignatureDescriptionSource
static { … }Implicit default constructor generated by the compiler (not written in the source).implicit
public static int classSize(HyperLinkedList classFieldList)3 statement(s); calls ClassFieldLink.listByteSize(); creates IllegalArgumentException.line 376
public void cleanUp()2 statement(s); calls super.cleanUp().
Overrides Gadget.cleanUp()
line 648
ClassFieldLink createFieldFromType(HyperView tView, int type)Build one ClassFieldLink of the given type (name + array lengths). Null if aborted.line 903
ClassFieldLink fieldAt(int index)4 statement(s).line 662
public void onClick()Called from within the context of the main Display output.
Overrides Gob.onClick()
line 389
public static int pack(SerializedObject tObject)6 statement(s).line 353
int parseFieldTypeToken(String raw)Map a typed token to TYPE_MASK value, or -1 for done/cancel, or -2 for unrecognized.line 757
String promptFieldName(HyperView tView, String prompt)3 statement(s); calls name.length(); creates HyperStringPop.line 832
int promptNestedType(HyperView tView)Prefer graphical palette (currentType); Type-in remains available. Returns -1 if cancelled.line 818
int promptPositiveInt(HyperView tView, String prompt)5 statement(s); calls Integer.parseInt(); creates HyperNumberPop.line 847
int promptTypeChoice(HyperView tView)4 statement(s); calls parseFieldTypeToken(); creates HyperStringPop, HyperPop.line 797
boolean tryAddNestedToSelected(HyperView tView)If the highlighted field is OBJECT*, offer to attach currentType as a nested child instead of top-level.line 1078
public static int upack(byte[] tByte, HyperLinkedList tFieldList)Returns 0.line 371
public void update()19 statement(s); calls graphics.setColor(), graphics.drawString(), graphics.fillRect(), graphics.drawLine(), updateClassFieldList().
Overrides BasicPane.update()
line 434
public void updateClassFieldList()18 statement(s); calls graphics.setColor(), graphics.fillRect(), graphics.drawString(), graphics.drawLine(), stringBuilder.delete() …; creates StringBuilder.line 492

Nested & additional classes

ExternalizerLoadGadgetDispatch (nested type, lines 1104–1113)

class ExternalizerLoadGadgetDispatch extends Dispatch

Fields (0)

None declared.

Constructors (1)

SignatureDescriptionSource
ExternalizerLoadGadgetDispatch()1 statement(s); calls super().line 1106

Methods (1)

SignatureDescriptionSource
public boolean begin(HyperView tView)Returns true.
Overrides Dispatch.begin()
line 1109

ExternalizerSaveGadgetDispatch (nested type, lines 1115–1126)

class ExternalizerSaveGadgetDispatch extends Dispatch

Fields (0)

None declared.

Constructors (1)

SignatureDescriptionSource
ExternalizerSaveGadgetDispatch()1 statement(s); calls super().line 1117

Methods (1)

SignatureDescriptionSource
public boolean begin(HyperView tView)Returns true.
Overrides Dispatch.begin()
line 1121

ExternalizerAddGadgetDispatch (nested type, lines 1128–1934)

class ExternalizerAddGadgetDispatch extends Dispatch

Fields (0)

None declared.

Constructors (1)

SignatureDescriptionSource
ExternalizerAddGadgetDispatch()1 statement(s); calls super().line 1130

Methods (1)

SignatureDescriptionSource
public boolean begin(HyperView tView)7 statement(s); calls tryAddNestedToSelected(), update(), tClassFieldLink.name.length(), fieldList.dlStore(), tClassFieldLink.ensureNestedFields() …; creates HyperStringPop, ClassFieldLink, HyperNumberPop.
Overrides Dispatch.begin()
line 1133

ExternalizerRemGadgetDispatch (nested type, lines 1936–1967)

class ExternalizerRemGadgetDispatch

Fields (0)

None declared.

Constructors (1)

SignatureDescriptionSource
ExternalizerRemGadgetDispatch()Implicit default constructor generated by the compiler (not written in the source).line 1936

Methods (1)

SignatureDescriptionSource
public boolean begin(HyperView tView)10 statement(s); calls fieldAt(), sel.isObjectBase(), nestedSummary(), manageNestedChildren(), update() …; creates HyperPop, HyperBoolPop.line 1938

ExternalizerNameStringDispatch (nested type, lines 1969–1975)

class ExternalizerNameStringDispatch

Fields (0)

None declared.

Constructors (1)

SignatureDescriptionSource
ExternalizerNameStringDispatch()Implicit default constructor generated by the compiler (not written in the source).line 1969

Methods (1)

SignatureDescriptionSource
public boolean begin(HyperView tView)Returns true.line 1971

FieldNumberDispatch (nested type, lines 1977–1983)

class FieldNumberDispatch extends Dispatch

Fields (0)

None declared.

Constructors (1)

SignatureDescriptionSource
FieldNumberDispatch()Implicit default constructor generated by the compiler (not written in the source).line 1977

Methods (1)

SignatureDescriptionSource
public boolean begin(HyperView tView)Returns true.
Overrides Dispatch.begin()
line 1979

ClickUp (nested type, lines 1985–1999)

class ClickUp extends UpperArrowMethod

Fields (0)

None declared.

Constructors (1)

SignatureDescriptionSource
ClickUp()1 statement(s); calls super().line 1987

Methods (1)

SignatureDescriptionSource
public void function(HyperScrollbar hsb)1 statement(s); calls updateClassFieldList().
Overrides UpperArrowMethod.function()
line 1990

ClickDown (nested type, lines 2001–2016)

class ClickDown extends LowerArrowMethod

Fields (0)

None declared.

Constructors (1)

SignatureDescriptionSource
ClickDown()1 statement(s); calls super().line 2003

Methods (1)

SignatureDescriptionSource
public void function(HyperScrollbar hsb)1 statement(s); calls updateClassFieldList().
Overrides LowerArrowMethod.function()
line 2007

ClickThumb (nested type, lines 2018–2061)

class ClickThumb extends ThumbPaneMethod

Fields (0)

None declared.

Constructors (1)

SignatureDescriptionSource
ClickThumb()1 statement(s); calls super().line 2020

Methods (1)

SignatureDescriptionSource
public void function(HyperScrollbar hsb)9 statement(s); calls update(); creates HyperPop.
Overrides ThumbPaneMethod.function()
line 2024

SaveExternalizerSouceDispatch (nested type, lines 2070–2614)

class SaveExternalizerSouceDispatch extends Dispatch

Fields (3)

DeclarationValue / initializerDescriptionSource
static final String[] C_TYPE= {"int8_t", "int16_t", "uint16_t", "int32_t", "int64_t", "float", "double"}No comment in source; used in cStructField().line 2102
static final int[] PRIM_BYTES= {1, 2, 2, 4, 8, 4, 8}No comment in source; not referenced by name in this type’s methods.line 2103
static final String[] PRIM_NAME= {"byte", "short", "char", "int", "long", "float", "double"}---- Fixed pack/unpack generators (2026-09-24) ---------------------------------------- One template per primitive type, used for single values, 1D arrays and 2D arrays alike. Byte order is big-endian (most significant byte first), the same order as the original generator and java.io.DataOutputStream. Writer: (byte)(v …line 2101

Constructors (1)

SignatureDescriptionSource
SaveExternalizerSouceDispatch()1 statement(s); calls super().line 2072

Methods (24)

SignatureDescriptionSource
static { … }Implicit default constructor generated by the compiler (not written in the source).implicit
public boolean begin(HyperView tView)6 statement(s); calls getObjectSize(), curView.runView(), generate().
Overrides Dispatch.begin()
line 2075
String cPackBytes(String u, int n)C writer: n bytes of the unsigned temporary u, most significant first: (uint8_t)(u >> 8*(n-1)) ... (uint8_t)(u)line 2263
String cSourceFile(HyperLinkedList tFieldList, String className, long tSize)Whole C file: struct (skip it with -DSERIALIZE_<class>_HAVE_STRUCT), byte size, pack and unpack.line 2422
String cUnpackExpr(String cast, int n)C reader expression: ((cast)inBuffer[currentOffset+i] << 8*(n-1-i)) OR-ed together, unsigned.line 2271
public void generate(HyperLinkedList tFieldList, long tSize)17 statement(s); calls fos.write(), tString.getBytes(), packField(), fieldBytes(), lineString.getBytes() …; creates File, FileOutputStream, HyperPop.line 2452
public long getObjectSize(HyperLinkedList tList)Shared with SerializedObject / fieldBytes: OBJECT recurses nestedFields (2026-09-25).line 2085
String loopClose(int dims)Closes the loops opened by loopOpen().line 2119
String packBytes(String v, int n)Java writer: n bytes of v, most significant first: (byte)(v >>> 8*(n-1)) ... (byte)(v)line 2137
String unpackExpr(int n, boolean isLong)Java reader: one expression; every byte is masked with 0xff, long values are built in long. Java evaluates the operands of | left to right, so the currentOffset++ reads are in order.line 2146

AbortExternalizerSouceDispatch (nested type, lines 2616–2628)

class AbortExternalizerSouceDispatch extends Dispatch

Fields (0)

None declared.

Constructors (1)

SignatureDescriptionSource
AbortExternalizerSouceDispatch()1 statement(s); calls super().line 2618

Methods (1)

SignatureDescriptionSource
public boolean begin(HyperView tView)3 statement(s).
Overrides Dispatch.begin()
line 2622

GenerateExternalizerSourceCodeDispatch (nested type, lines 2631–2687)

class GenerateExternalizerSourceCodeDispatch extends Dispatch

Fields (0)

None declared.

Constructors (1)

SignatureDescriptionSource
GenerateExternalizerSourceCodeDispatch()1 statement(s); calls super().line 2633

Methods (1)

SignatureDescriptionSource
public boolean begin(HyperView tView)30 statement(s); calls popPane.move(), popPane.graphics.setColor(), popPane.graphics.setFont(), popPane.graphics.drawString(), popPane.addGob() …; creates BasicPane, GetString, RadioButton.
Overrides Dispatch.begin()
line 2641

GetObjectRegistryDispatch (nested type, lines 2689–2713)

class GetObjectRegistryDispatch extends Dispatch

Fields (1)

DeclarationValue / initializerDescriptionSource
ObjectRegistryPane objectRegistryPaneNo comment in source; assigned in begin().line 2691

Constructors (1)

SignatureDescriptionSource
GetObjectRegistryDispatch()1 statement(s); calls super().line 2693

Methods (1)

SignatureDescriptionSource
public boolean begin(HyperView tView)7 statement(s); calls objectRegistryPane.graphics.setColor(), tView.runView(); creates ObjectRegistryPane.
Overrides Dispatch.begin()
line 2702

Inherited members

Non-private members inherited from HyperView superclasses and not overridden or hidden here.

From BasicPane (27 fields, 7 methods)

Fields: charHeight, deviceColor0, deviceColor1, deviceColor2, fontHeight, frameColor, frameColor1, frameColor2, frameColor3, frameWidth, itemColor0, itemColor1, itemColor2, menuPaneColor, mpHeight, mpWidth, mpX, mpX2, mpY, mpY2, selectedColor0, selectedColor1, selectedColor2, textColor, textPaneColor, textPaneHeight, textPaneWidth

Methods: drawString(String, int, int), drawString(String, int, int, int), drawStrings(StringArr, int, int), erase(), makeBitMap(Font), setFont(Font), setPaneColor(int)

From Gadget (35 fields, 25 methods)

Fields: backColor, conFont, cursorGraphics, cursorHeight, cursorImage, cursorName, cursorScrollXOffset, cursorScrollYOffset, cursorWidth, cursorX, cursorY, displayInfo, fGColor, flipCount, font, gadFlags, gadFlags2, gadNumber, keyboard, lastCursorX, lastCursorY, lineColorA, lineColorB, lineColorC, locked, method, parentTitlebar, stringHeight, stringWidth, stringX, stringY, tc1, tc2, tc3, tc4

Methods: addDispatch(Dispatch), allKeyMsgENA(), drawCursor(), drawOutline(), drawOutline2(), getForeground(), inKey(), inString(String), isEnabled(), isShowing(), isVisible(), keyReleaseENA(), keyTypedENA(), layerDisable(), layerENA(), makeBitmap(Font), mouseWheelMoved(MouseWheelEvent), onMouseOver(), setEnabled(boolean), setForeground(int), setName(String), setVisible(boolean), toFront(), toString(), updateText()

From Gob (76 fields, 26 methods)

Fields: asynchGraphics1, asynchGraphics2, asynchImage1, asynchImage2, attachedGob, attachedIndex, backGround, bgMemoryImageSource, bGPen, bottomMax, clickX, clickY, collisionClassMask, curAttached, currentZIndex, curView, depth, destGob, destGraphics, dispatchHoldCount, drawMode, dX, dY, dZ, fgMemoryImageSource, fGPen, gobEventFlags, gobFlags, gobFlags2, gobGadIndex, gobHx, gobHy, gobHz, gobName, gobNumber, gobOrbitRadius, gobPic, gobTypeFlags, graphics, gravity, height, heightBase, hSin, hyp, infoString, lClickX, lClickY, leftMin, maxAttached, memoryCounter, moveNum, mX, mX2, mY, mY2, oldX, oldY, oldZ, orbitGob, rightMax, scanLine, selectGraphics, selectImage, selectTime, spline, tint, topMin, totalAttached, width, widthBase, wSin, x, x2, y, y2, z

Methods: addGob(Gob), addSpline(Spline), center(), collisionOff(), collisionOn(), disable(), enable(), getGraphics(), getImageFromJar(String), getPixels(), gobZInit(), initScanline(int), inView(), isInView(), isMemoryImageSource(), move(int, int), move(Gadget, int, int), moveNext(), onDisplay(), onRelease(), printGobAttr(HyperView), printScanLines(), remGob(), remove(), zENA(), zOff()

From Linkable (7 fields, 1 methods)

Fields: attachment, index, linkFlags, name, next, parentList, prev

Methods: inList()

Examples

Real usage taken from elsewhere in the HyperView 3.2 source (file and line shown; source path src/com/multiversesocial/hyperview/).

instantiation — ExternalizerButton.java, line 31

   31  externalizer = new Externalizer(curView);
Hits--