link start!

This commit is contained in:
cherubin
2026-03-17 13:31:18 -07:00
commit 08abe87cfb
5910 changed files with 386288 additions and 0 deletions
@@ -0,0 +1,130 @@
/*
* Decompiled with CFR 0.152.
*/
package com.tridium.sys.schema;
import com.tridium.sys.schema.DynamicTable;
import com.tridium.sys.schema.NAction;
import javax.baja.sys.Action;
import javax.baja.sys.BComplex;
import javax.baja.sys.BObject;
import javax.baja.sys.Context;
import javax.baja.sys.CursorException;
import javax.baja.sys.Property;
import javax.baja.sys.Slot;
import javax.baja.sys.SlotCursor;
import javax.baja.sys.Topic;
final class ActionCursor
implements SlotCursor {
private int index = -1;
private BComplex object;
private NAction[] frozen;
private DynamicTable dynamic;
public final BObject target() {
return this.object;
}
public final Context getContext() {
return null;
}
/*
* Unable to fully structure code
*/
public final boolean next() {
if (++this.index < this.frozen.length) {
return true;
}
if (this.dynamic != null) ** GOTO lbl8
return false;
lbl-1000:
// 1 sources
{
if (this.dynamic.slots[this.index - this.frozen.length].isAction()) {
return true;
}
++this.index;
lbl8:
// 2 sources
** while (this.index - this.frozen.length < this.dynamic.count)
}
lbl9:
// 1 sources
return false;
}
public final boolean nextObject() {
throw new CursorException("Only for iterating through properties");
}
public final boolean nextComponent() {
throw new CursorException("Only for iterating through properties");
}
public final boolean next(Class clazz) {
throw new CursorException("Only for iterating through properties");
}
public final Slot slot() {
if (this.index < this.frozen.length) {
return this.frozen[this.index];
}
return this.dynamic.slots[this.index - this.frozen.length];
}
public final Action action() {
return this.slot().asAction();
}
public final Property property() {
throw new CursorException("not property");
}
public final int getTypeAccess() {
throw new CursorException("not property");
}
public final BObject get() {
throw new CursorException("not property");
}
public final boolean getBoolean() {
throw new CursorException("not property");
}
public final int getInt() {
throw new CursorException("not property");
}
public final long getLong() {
throw new CursorException("not property");
}
public final float getFloat() {
throw new CursorException("not property");
}
public final double getDouble() {
throw new CursorException("not property");
}
public final String getString() {
throw new CursorException("not property");
}
public final Topic topic() {
throw new CursorException("not topic");
}
ActionCursor(BComplex bComplex, NAction[] nActionArray, DynamicTable dynamicTable) {
this.object = bComplex;
this.frozen = nActionArray;
this.dynamic = dynamicTable;
}
}
@@ -0,0 +1,762 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* javax.baja.nre.util.TextUtil
*/
package com.tridium.sys.schema;
import com.tridium.asm.Assembler;
import com.tridium.asm.AttributeInfo;
import com.tridium.asm.Buffer;
import com.tridium.asm.Code;
import com.tridium.asm.ConstantPool;
import com.tridium.asm.FieldInfo;
import com.tridium.asm.Jvm;
import com.tridium.asm.MethodInfo;
import com.tridium.asm.OpCodes;
import com.tridium.sys.schema.NAction;
import com.tridium.sys.schema.NProperty;
import com.tridium.sys.schema.NSlot;
import javax.baja.nre.util.TextUtil;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
class Compiler
implements OpCodes {
int init;
int exceptionCls;
int exceptionCtor;
int npropCls;
int npropGetDef;
int bbooleanCls;
int bintegerCls;
int blongCls;
int bfloatCls;
int bdoubleCls;
int bstringCls;
int bbooleanMake;
int bintegerMake;
int blongMake;
int bfloatMake;
int bdoubleMake;
int bstringMake;
int getBoolean;
int getInt;
int getLong;
int getFloat;
int getDouble;
int getString;
SwitchCode g;
SwitchCode s;
SwitchCode gb;
SwitchCode sb;
SwitchCode gi;
SwitchCode si;
SwitchCode gj;
SwitchCode sj;
SwitchCode gf;
SwitchCode sf;
SwitchCode gd;
SwitchCode sd;
SwitchCode gs;
SwitchCode ss;
SwitchCode invoke;
Assembler asm;
ConstantPool cp;
int complexClass;
NSlot[] slots;
int[] propFields;
Buffer compile() {
this.genFields();
this.genConstructor();
this.genNewSlotMapInstance();
this.genNewBComplexInstance();
this.genAccessors();
this.addAccessors();
this.asm.addAttribute(new AttributeInfo(this.asm, "SourceFile", "AutoGenerated"));
return this.asm.compile();
}
private final void genFields() {
int n = 2;
this.propFields = new int[this.slots.length];
int n2 = 0;
while (n2 < this.slots.length) {
if (this.slots[n2].isProperty()) {
NProperty nProperty = (NProperty)this.slots[n2];
String string = "p" + n2;
String string2 = null;
switch (nProperty.typeAccess) {
case 0: {
string2 = "Z";
break;
}
case 2: {
string2 = "I";
break;
}
case 3: {
string2 = "J";
break;
}
case 4: {
string2 = "F";
break;
}
case 5: {
string2 = "D";
break;
}
case 6: {
string2 = "Ljava/lang/String;";
break;
}
case 7: {
string2 = "Ljavax/baja/sys/BValue;";
break;
}
default: {
throw new IllegalStateException();
}
}
FieldInfo fieldInfo = new FieldInfo(this.asm, "p" + n2, string2, n);
this.asm.addField(fieldInfo);
this.propFields[n2] = this.cp.field(fieldInfo);
}
++n2;
}
}
private final void genConstructor() {
Code code = new Code(this.asm);
code.add(42);
code.add(183, code.cp.method(this.asm.superClass, this.init(), "()V"));
code.add(177);
this.asm.addMethod(new MethodInfo(this.asm, this.init(), "()V", 1, code));
}
private final void genNewSlotMapInstance() {
int n = this.cp.method(this.asm.thisClass, this.init(), "()V");
Code code = new Code(this.asm);
code.add(187, this.asm.thisClass);
code.add(89);
code.add(183, n);
code.add(176);
this.asm.addMethod(new MethodInfo(this.asm, "newSlotMapInstance", "()Lcom/tridium/sys/schema/ComplexSlotMap;", 1, code));
}
private final void genNewBComplexInstance() {
int n = this.cp.method(this.complexClass, this.init(), "()V");
Code code = new Code(this.asm);
code.add(187, this.complexClass);
code.add(89);
code.add(183, n);
code.add(176);
this.asm.addMethod(new MethodInfo(this.asm, "newBComplexInstance", "()Ljavax/baja/sys/BComplex;", 1, code));
}
private final void genAccessors() {
int n = 0;
while (n < this.slots.length) {
NSlot nSlot = this.slots[n];
if (!nSlot.isTopic()) {
if (nSlot.isAction()) {
if (this.invoke == null) {
this.invoke = this.beginAccessorMethod();
}
this.genInvoke((NAction)nSlot, this.invoke);
} else {
NProperty nProperty = (NProperty)nSlot;
if (this.g == null) {
this.g = this.beginAccessorMethod();
this.s = this.beginAccessorMethod();
}
switch (nProperty.getTypeAccess()) {
case 0: {
if (this.gb == null) {
this.gb = this.beginAccessorMethod();
this.sb = this.beginAccessorMethod();
}
this.genGetBoolean(nProperty, this.g, this.gb);
this.genSetBoolean(nProperty, this.s, this.sb);
break;
}
case 2: {
if (this.gi == null) {
this.gi = this.beginAccessorMethod();
this.si = this.beginAccessorMethod();
}
this.genGetInt(nProperty, this.g, this.gi);
this.genSetInt(nProperty, this.s, this.si);
break;
}
case 3: {
if (this.gj == null) {
this.gj = this.beginAccessorMethod();
this.sj = this.beginAccessorMethod();
}
this.genGetLong(nProperty, this.g, this.gj);
this.genSetLong(nProperty, this.s, this.sj);
break;
}
case 4: {
if (this.gf == null) {
this.gf = this.beginAccessorMethod();
this.sf = this.beginAccessorMethod();
}
this.genGetFloat(nProperty, this.g, this.gf);
this.genSetFloat(nProperty, this.s, this.sf);
break;
}
case 5: {
if (this.gd == null) {
this.gd = this.beginAccessorMethod();
this.sd = this.beginAccessorMethod();
}
this.genGetDouble(nProperty, this.g, this.gd);
this.genSetDouble(nProperty, this.s, this.sd);
break;
}
case 6: {
if (this.gs == null) {
this.gs = this.beginAccessorMethod();
this.ss = this.beginAccessorMethod();
}
this.genGetString(nProperty, this.g, this.gs);
this.genSetString(nProperty, this.s, this.ss);
break;
}
case 7: {
this.genGetGeneric(nProperty, this.g);
this.genSetGeneric(nProperty, this.s);
break;
}
}
}
}
++n;
}
}
private final void addAccessors() {
if (this.g != null) {
this.asm.addMethod(new MethodInfo(this.asm, "g", "(I)Ljavax/baja/sys/BValue;", 17, this.g.code));
this.asm.addMethod(new MethodInfo(this.asm, "s", "(ILjavax/baja/sys/BValue;)V", 17, this.s.code));
}
if (this.gb != null) {
this.asm.addMethod(new MethodInfo(this.asm, "gb", "(I)Z", 17, this.gb.code));
this.asm.addMethod(new MethodInfo(this.asm, "sb", "(IZ)V", 17, this.sb.code));
}
if (this.gi != null) {
this.asm.addMethod(new MethodInfo(this.asm, "gi", "(I)I", 17, this.gi.code));
this.asm.addMethod(new MethodInfo(this.asm, "si", "(II)V", 17, this.si.code));
}
if (this.gj != null) {
this.asm.addMethod(new MethodInfo(this.asm, "gj", "(I)J", 17, this.gj.code));
this.asm.addMethod(new MethodInfo(this.asm, "sj", "(IJ)V", 17, this.sj.code));
}
if (this.gf != null) {
this.asm.addMethod(new MethodInfo(this.asm, "gf", "(I)F", 17, this.gf.code));
this.asm.addMethod(new MethodInfo(this.asm, "sf", "(IF)V", 17, this.sf.code));
}
if (this.gd != null) {
this.asm.addMethod(new MethodInfo(this.asm, "gd", "(I)D", 17, this.gd.code));
this.asm.addMethod(new MethodInfo(this.asm, "sd", "(ID)V", 17, this.sd.code));
}
if (this.gs != null) {
this.asm.addMethod(new MethodInfo(this.asm, "gs", "(I)Ljava/lang/String;", 17, this.gs.code));
this.asm.addMethod(new MethodInfo(this.asm, "ss", "(ILjava/lang/String;)V", 17, this.ss.code));
}
if (this.invoke != null) {
this.asm.addMethod(new MethodInfo(this.asm, "invoke", "(ILjavax/baja/sys/BComponent;Ljavax/baja/sys/BValue;Ljavax/baja/sys/Context;)Ljavax/baja/sys/BValue;", 17, this.invoke.code));
}
}
private final void genGetGeneric(NProperty nProperty, SwitchCode switchCode) {
Code code = switchCode.code;
int n = this.propFields[nProperty.index];
int n2 = code.add(42);
code.add(180, n);
code.add(176);
this.backpatch(switchCode, nProperty.index, n2);
}
private final void genGetBoolean(NProperty nProperty, SwitchCode switchCode, SwitchCode switchCode2) {
Code code = switchCode.code;
int n = this.propFields[nProperty.index];
int n2 = code.add(42);
code.add(180, n);
code.add(184, this.bbooleanMake());
code.add(176);
this.backpatch(switchCode, nProperty.index, n2);
code = switchCode2.code;
n2 = code.add(42);
code.add(180, n);
code.add(172);
this.backpatch(switchCode2, nProperty.index, n2);
}
private final void genGetInt(NProperty nProperty, SwitchCode switchCode, SwitchCode switchCode2) {
Code code = switchCode.code;
int n = this.propFields[nProperty.index];
int n2 = code.add(42);
code.add(180, n);
code.add(184, this.bintegerMake());
code.add(176);
this.backpatch(switchCode, nProperty.index, n2);
code = switchCode2.code;
n2 = code.add(42);
code.add(180, n);
code.add(172);
this.backpatch(switchCode2, nProperty.index, n2);
}
private final void genGetLong(NProperty nProperty, SwitchCode switchCode, SwitchCode switchCode2) {
Code code = switchCode.code;
int n = this.propFields[nProperty.index];
int n2 = code.add(42);
code.add(180, n);
code.add(184, this.blongMake());
code.add(176);
this.backpatch(switchCode, nProperty.index, n2);
code = switchCode2.code;
n2 = code.add(42);
code.add(180, n);
code.add(173);
this.backpatch(switchCode2, nProperty.index, n2);
}
private final void genGetFloat(NProperty nProperty, SwitchCode switchCode, SwitchCode switchCode2) {
Code code = switchCode.code;
int n = this.propFields[nProperty.index];
int n2 = code.add(42);
code.add(180, n);
code.add(184, this.bfloatMake());
code.add(176);
this.backpatch(switchCode, nProperty.index, n2);
code = switchCode2.code;
n2 = code.add(42);
code.add(180, n);
code.add(174);
this.backpatch(switchCode2, nProperty.index, n2);
}
private final void genGetDouble(NProperty nProperty, SwitchCode switchCode, SwitchCode switchCode2) {
Code code = switchCode.code;
int n = this.propFields[nProperty.index];
int n2 = code.add(42);
code.add(180, n);
code.add(184, this.bdoubleMake());
code.add(176);
this.backpatch(switchCode, nProperty.index, n2);
code = switchCode2.code;
n2 = code.add(42);
code.add(180, n);
code.add(175);
this.backpatch(switchCode2, nProperty.index, n2);
}
private final void genGetString(NProperty nProperty, SwitchCode switchCode, SwitchCode switchCode2) {
Code code = switchCode.code;
int n = this.propFields[nProperty.index];
int n2 = code.add(42);
code.add(180, n);
code.add(184, this.bstringMake());
code.add(176);
this.backpatch(switchCode, nProperty.index, n2);
code = switchCode2.code;
n2 = code.add(42);
code.add(180, n);
code.add(176);
this.backpatch(switchCode2, nProperty.index, n2);
}
private final void genSetGeneric(NProperty nProperty, SwitchCode switchCode) {
Code code = switchCode.code;
int n = this.propFields[nProperty.index];
int n2 = this.cp.cls(nProperty.typeClass);
int n3 = code.add(42);
code.add(44);
code.add(192, n2);
code.add(181, n);
code.add(177);
this.backpatch(switchCode, nProperty.index, n3);
}
private final void genSetBoolean(NProperty nProperty, SwitchCode switchCode, SwitchCode switchCode2) {
Code code = switchCode.code;
int n = this.propFields[nProperty.index];
int n2 = code.add(42);
code.add(44);
code.add(192, this.bbooleanCls());
code.add(182, this.getBoolean());
code.add(181, n);
code.add(177);
this.backpatch(switchCode, nProperty.index, n2);
code = switchCode2.code;
n2 = code.add(42);
code.add(28);
code.add(181, n);
code.add(177);
this.backpatch(switchCode2, nProperty.index, n2);
}
private final void genSetInt(NProperty nProperty, SwitchCode switchCode, SwitchCode switchCode2) {
Code code = switchCode.code;
int n = this.propFields[nProperty.index];
int n2 = code.add(42);
code.add(44);
code.add(192, this.bintegerCls());
code.add(182, this.getInt());
code.add(181, n);
code.add(177);
this.backpatch(switchCode, nProperty.index, n2);
code = switchCode2.code;
n2 = code.add(42);
code.add(28);
code.add(181, n);
code.add(177);
this.backpatch(switchCode2, nProperty.index, n2);
}
private final void genSetLong(NProperty nProperty, SwitchCode switchCode, SwitchCode switchCode2) {
Code code = switchCode.code;
int n = this.propFields[nProperty.index];
int n2 = code.add(42);
code.add(44);
code.add(192, this.blongCls());
code.add(182, this.getLong());
code.add(181, n);
code.add(177);
this.backpatch(switchCode, nProperty.index, n2);
code = switchCode2.code;
n2 = code.add(42);
code.add(32);
code.add(181, n);
code.add(177);
this.backpatch(switchCode2, nProperty.index, n2);
}
private final void genSetFloat(NProperty nProperty, SwitchCode switchCode, SwitchCode switchCode2) {
Code code = switchCode.code;
int n = this.propFields[nProperty.index];
int n2 = code.add(42);
code.add(44);
code.add(192, this.bfloatCls());
code.add(182, this.getFloat());
code.add(181, n);
code.add(177);
this.backpatch(switchCode, nProperty.index, n2);
code = switchCode2.code;
n2 = code.add(42);
code.add(36);
code.add(181, n);
code.add(177);
this.backpatch(switchCode2, nProperty.index, n2);
}
private final void genSetDouble(NProperty nProperty, SwitchCode switchCode, SwitchCode switchCode2) {
Code code = switchCode.code;
int n = this.propFields[nProperty.index];
int n2 = code.add(42);
code.add(44);
code.add(192, this.bdoubleCls());
code.add(182, this.getDouble());
code.add(181, n);
code.add(177);
this.backpatch(switchCode, nProperty.index, n2);
code = switchCode2.code;
n2 = code.add(42);
code.add(40);
code.add(181, n);
code.add(177);
this.backpatch(switchCode2, nProperty.index, n2);
}
private final void genSetString(NProperty nProperty, SwitchCode switchCode, SwitchCode switchCode2) {
Code code = switchCode.code;
int n = this.propFields[nProperty.index];
int n2 = code.add(42);
code.add(44);
code.add(192, this.bstringCls());
code.add(182, this.getString());
code.add(181, n);
code.add(177);
this.backpatch(switchCode, nProperty.index, n2);
code = switchCode2.code;
n2 = code.add(42);
code.add(44);
code.add(181, n);
code.add(177);
this.backpatch(switchCode2, nProperty.index, n2);
}
private final void genInvoke(NAction nAction, SwitchCode switchCode) {
Code code = switchCode.code;
Class clazz = nAction.parameterClass;
Class clazz2 = nAction.returnClass;
int n = code.add(44);
code.add(192, this.complexClass);
if (clazz != null) {
int n2 = this.cp.cls(clazz);
code.add(45);
code.add(192, n2);
}
if (nAction.doTakesContext) {
code.add(25, 4);
}
String string = "do" + TextUtil.capitalize((String)nAction.name);
StringBuffer stringBuffer = new StringBuffer("(");
if (clazz != null) {
stringBuffer.append(Jvm.fieldDescriptor(clazz));
}
if (nAction.doTakesContext) {
stringBuffer.append("Ljavax/baja/sys/Context;");
}
stringBuffer.append(")");
if (clazz2 == null) {
stringBuffer.append("V");
} else {
stringBuffer.append(Jvm.fieldDescriptor(clazz2));
}
int n3 = this.cp.method(this.complexClass, string, stringBuffer.toString());
code.add(182, n3);
if (clazz2 == null) {
code.add(1);
}
code.add(176);
this.backpatch(switchCode, nAction.index, n);
}
private final SwitchCode beginAccessorMethod() {
Code code = new Code(this.asm);
int n = this.slots.length;
code.add(27);
int n2 = code.addPad(170);
int n3 = code.code.u4(0);
int n4 = n3 + 12 + n * 4;
int n5 = n4 - n2;
code.code.u4(n3, n5);
code.code.u4(0);
code.code.u4(n - 1);
int n6 = n3 + 12;
int n7 = 0;
while (n7 < n) {
code.code.u4(n5);
++n7;
}
code.add(187, this.exceptionCls());
code.add(89);
code.add(183, this.exceptionCtor());
code.add(191);
return new SwitchCode(code, n2, n6);
}
private final void backpatch(SwitchCode switchCode, int n, int n2) {
switchCode.code.code.u4(switchCode.firstJumpOffset + n * 4, n2 - switchCode.switchOffset);
}
int init() {
if (this.init == 0) {
this.init = this.cp.utf("<init>");
}
return this.init;
}
int exceptionCls() {
if (this.exceptionCls == 0) {
this.exceptionCls = this.cp.cls("com/tridium/sys/schema/UnhandledSlotException");
}
return this.exceptionCls;
}
int exceptionCtor() {
if (this.exceptionCtor == 0) {
this.exceptionCtor = this.cp.method(this.exceptionCls(), this.init(), "()V");
}
return this.exceptionCtor;
}
int npropCls() {
if (this.npropCls == 0) {
this.npropCls = this.cp.cls("com/tridium/sys/schema/NProperty");
}
return this.npropCls;
}
int npropGetDef() {
if (this.npropGetDef == 0) {
this.npropGetDef = this.cp.method(this.npropCls(), "getDefaultValue", "()Ljavax/baja/sys/BValue;");
}
return this.npropGetDef;
}
int bbooleanCls() {
if (this.bbooleanCls == 0) {
this.bbooleanCls = this.cp.cls("javax/baja/sys/BBoolean");
}
return this.bbooleanCls;
}
int bintegerCls() {
if (this.bintegerCls == 0) {
this.bintegerCls = this.cp.cls("javax/baja/sys/BInteger");
}
return this.bintegerCls;
}
int blongCls() {
if (this.blongCls == 0) {
this.blongCls = this.cp.cls("javax/baja/sys/BLong");
}
return this.blongCls;
}
int bfloatCls() {
if (this.bfloatCls == 0) {
this.bfloatCls = this.cp.cls("javax/baja/sys/BFloat");
}
return this.bfloatCls;
}
int bdoubleCls() {
if (this.bdoubleCls == 0) {
this.bdoubleCls = this.cp.cls("javax/baja/sys/BDouble");
}
return this.bdoubleCls;
}
int bstringCls() {
if (this.bstringCls == 0) {
this.bstringCls = this.cp.cls("javax/baja/sys/BString");
}
return this.bstringCls;
}
int bbooleanMake() {
if (this.bbooleanMake == 0) {
this.bbooleanMake = this.cp.method(this.bbooleanCls(), "make", "(Z)Ljavax/baja/sys/BBoolean;");
}
return this.bbooleanMake;
}
int bintegerMake() {
if (this.bintegerMake == 0) {
this.bintegerMake = this.cp.method(this.bintegerCls(), "make", "(I)Ljavax/baja/sys/BInteger;");
}
return this.bintegerMake;
}
int blongMake() {
if (this.blongMake == 0) {
this.blongMake = this.cp.method(this.blongCls(), "make", "(J)Ljavax/baja/sys/BLong;");
}
return this.blongMake;
}
int bfloatMake() {
if (this.bfloatMake == 0) {
this.bfloatMake = this.cp.method(this.bfloatCls(), "make", "(F)Ljavax/baja/sys/BFloat;");
}
return this.bfloatMake;
}
int bdoubleMake() {
if (this.bdoubleMake == 0) {
this.bdoubleMake = this.cp.method(this.bdoubleCls(), "make", "(D)Ljavax/baja/sys/BDouble;");
}
return this.bdoubleMake;
}
int bstringMake() {
if (this.bstringMake == 0) {
this.bstringMake = this.cp.method(this.bstringCls(), "make", "(Ljava/lang/String;)Ljavax/baja/sys/BString;");
}
return this.bstringMake;
}
int getBoolean() {
if (this.getBoolean == 0) {
this.getBoolean = this.cp.method(this.bbooleanCls(), "getBoolean", "()Z");
}
return this.getBoolean;
}
int getInt() {
if (this.getInt == 0) {
this.getInt = this.cp.method(this.bintegerCls(), "getInt", "()I");
}
return this.getInt;
}
int getLong() {
if (this.getLong == 0) {
this.getLong = this.cp.method(this.blongCls(), "getLong", "()J");
}
return this.getLong;
}
int getFloat() {
if (this.getFloat == 0) {
this.getFloat = this.cp.method(this.bfloatCls(), "getFloat", "()F");
}
return this.getFloat;
}
int getDouble() {
if (this.getDouble == 0) {
this.getDouble = this.cp.method(this.bdoubleCls(), "getDouble", "()D");
}
return this.getDouble;
}
int getString() {
if (this.getString == 0) {
this.getString = this.cp.method(this.bstringCls(), "getString", "()Ljava/lang/String;");
}
return this.getString;
}
private final /* synthetic */ void this() {
this.g = null;
this.s = null;
this.gb = null;
this.sb = null;
this.gi = null;
this.si = null;
this.gj = null;
this.sj = null;
this.gf = null;
this.sf = null;
this.gd = null;
this.sd = null;
this.gs = null;
this.ss = null;
this.invoke = null;
}
Compiler(String string, String string2, Class clazz, NSlot[] nSlotArray) {
this.this();
int n = 33;
this.asm = new Assembler(string2, string, n, null);
this.cp = this.asm.cp;
this.slots = nSlotArray;
this.complexClass = this.cp.cls(clazz);
}
static class SwitchCode {
Code code;
int switchOffset;
int firstJumpOffset;
SwitchCode(Code code, int n, int n2) {
this.code = code;
this.switchOffset = n;
this.firstJumpOffset = n2;
}
}
}
@@ -0,0 +1,547 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* javax.baja.nre.util.TextUtil
*/
package com.tridium.sys.schema;
import com.tridium.asm.Buffer;
import com.tridium.sys.module.AutoClassLoader;
import com.tridium.sys.schema.Compiler;
import com.tridium.sys.schema.ComplexSlotMap;
import com.tridium.sys.schema.ComplexType;
import com.tridium.sys.schema.Introspector;
import com.tridium.sys.schema.MethodMap;
import com.tridium.sys.schema.NAction;
import com.tridium.sys.schema.NProperty;
import com.tridium.sys.schema.NSlot;
import com.tridium.sys.schema.NTopic;
import com.tridium.sys.schema.Utils;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import javax.baja.nre.util.TextUtil;
import javax.baja.sys.BDouble;
import javax.baja.sys.BFloat;
import javax.baja.sys.BInteger;
import javax.baja.sys.BLong;
import javax.baja.sys.Slot;
import javax.baja.sys.Type;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class ComplexIntrospector
extends Introspector {
MethodMap methods;
NSlot[] slots;
NProperty[] properties;
NAction[] actions;
NTopic[] topics;
ComplexSlotMap slotMap;
boolean isComponent;
HashMap superSlotsToFix;
static /* synthetic */ Class class$javax$baja$sys$BComponent;
static /* synthetic */ Class class$javax$baja$sys$BObject;
static /* synthetic */ Class class$javax$baja$sys$BBoolean;
static /* synthetic */ Class class$javax$baja$sys$BInteger;
static /* synthetic */ Class class$javax$baja$sys$BLong;
static /* synthetic */ Class class$javax$baja$sys$BFloat;
static /* synthetic */ Class class$javax$baja$sys$BDouble;
static /* synthetic */ Class class$javax$baja$sys$BString;
static /* synthetic */ Class class$javax$baja$sys$BValue;
static /* synthetic */ Class class$javax$baja$sys$Context;
Type introspect() throws Exception {
this.mapSlots();
this.generateSlotMapClass();
return this.makeType();
}
protected Type makeType() {
return new ComplexType(this);
}
protected void mapSlots() throws Exception {
ArrayList<NProperty> arrayList = new ArrayList<NProperty>();
ArrayList<NProperty> arrayList2 = new ArrayList<NProperty>();
ArrayList<NProperty> arrayList3 = new ArrayList<NProperty>();
ArrayList<NProperty> arrayList4 = new ArrayList<NProperty>();
Field[] fieldArray = this.resolveFields();
int n = 0;
while (n < fieldArray.length) {
Field field = fieldArray[n];
if (field != null) {
Class<?> clazz = field.getType();
NSlot nSlot = null;
try {
NSlot nSlot2;
if (clazz == propertyClass) {
nSlot2 = this.mapProperty((NProperty)this.getSlotField(field));
arrayList2.add((NProperty)nSlot2);
nSlot = nSlot2;
} else if (clazz == actionClass) {
nSlot2 = this.mapAction((NAction)this.getSlotField(field));
arrayList3.add((NProperty)nSlot2);
nSlot = nSlot2;
} else if (clazz == topicClass) {
nSlot2 = this.mapTopic((NTopic)this.getSlotField(field));
arrayList4.add((NProperty)nSlot2);
nSlot = nSlot2;
}
}
catch (Exception exception) {
this.err("" + field);
throw exception;
}
if (nSlot != null) {
nSlot.index = arrayList.size();
arrayList.add((NProperty)nSlot);
}
}
++n;
}
this.slots = arrayList.toArray(new NSlot[arrayList.size()]);
this.properties = arrayList2.toArray(new NProperty[arrayList2.size()]);
this.actions = arrayList3.toArray(new NAction[arrayList3.size()]);
this.topics = arrayList4.toArray(new NTopic[arrayList4.size()]);
if (this.superSlotsToFix != null) {
this.fixSuperSlots();
}
}
/*
* Unable to fully structure code
*/
protected Field[] resolveFields() {
var1_1 = new ArrayList<Class>();
var2_2 = this.cls;
if (true) ** GOTO lbl8
do {
var1_1.add((Class)var2_2);
var2_2 = var2_2.getSuperclass();
lbl8:
// 2 sources
if ((v0 = ComplexIntrospector.class$javax$baja$sys$BObject) != null) continue;
v0 = ComplexIntrospector.class("[Ljavax.baja.sys.BObject;", false);
} while (var2_2 != v0 && var2_2 != null);
var2_2 = new ArrayList<E>();
var3_3 = new HashMap<String, Integer>();
var4_4 = var1_1.size() - 1;
while (var4_4 >= 0) {
var5_5 = ((Class)var1_1.get(var4_4)).getDeclaredFields();
var6_6 = 0;
while (var6_6 < var5_5.length) {
var7_7 = var5_5[var6_6];
var8_8 = var7_7.getType();
if (this.isPublicStaticFinal(var7_7) && (var8_8 == ComplexIntrospector.propertyClass || var8_8 == ComplexIntrospector.actionClass || var8_8 == ComplexIntrospector.topicClass)) {
var9_9 = (Integer)var3_3.get(var7_7.getName());
if (var9_9 != null) {
var10_10 = var9_9;
this.checkSuperSlotInitialized((Field)var2_2.get(var10_10));
var2_2.set(var10_10, var7_7);
} else {
var3_3.put(var7_7.getName(), new Integer(var2_2.size()));
var2_2.add(var7_7);
}
}
++var6_6;
}
--var4_4;
}
return var2_2.toArray(new Field[var2_2.size()]);
}
protected Slot getSlotField(Field field) throws Exception {
NSlot nSlot = null;
try {
nSlot = (NSlot)field.get(null);
}
catch (Exception exception) {
throw this.err("Cannot access slot field \"" + field + "\": " + exception);
}
if (nSlot == null) {
throw this.err("Slot field is null (insure loadType is last)", field.getName());
}
nSlot.name = field.getName();
nSlot.displayName = TextUtil.toFriendly((String)nSlot.name);
return nSlot;
}
protected NProperty mapProperty(NProperty nProperty) {
String string = nProperty.name;
String string2 = TextUtil.capitalize((String)string);
Method method = this.methods.getMethod("get" + string2, MethodMap.noParams);
if (method == null && (method = this.methods.getMethod("is" + string2, MethodMap.noParams)) != null && method.getReturnType() != Boolean.TYPE) {
throw this.err("Only boolean properties may support 'is' getter", string);
}
if (method == null) {
throw this.err("No getter for property", string);
}
if (method.getParameterTypes().length != 0) {
throw this.err("Parameters not allowed on getter", string);
}
TypeSpec typeSpec = new TypeSpec(method.getReturnType());
if (typeSpec.isError()) {
throw this.err("Unsupported type for property", string);
}
if (!this.isComponent && typeSpec.isPotentialComponent()) {
throw this.err("Structs may not contain potential component types", string);
}
if (typeSpec.isBWrapper()) {
throw this.err("Use primitive, not BObject wrapper for " + string);
}
Method method2 = this.methods.getMethod("set" + string2, typeSpec.cls);
if (method2 == null) {
throw this.err("No setter for property", string);
}
if (method2.getReturnType() != Void.TYPE) {
throw this.err("Setter must have void return type", string);
}
nProperty.typeClass = typeSpec.cls;
nProperty.typeAccess = typeSpec.typeAccess;
Class clazz = null;
switch (nProperty.typeAccess) {
case 0: {
Class clazz2 = class$javax$baja$sys$BBoolean;
if (clazz2 == null) {
clazz2 = class$javax$baja$sys$BBoolean = ComplexIntrospector.class("[Ljavax.baja.sys.BBoolean;", false);
}
clazz = clazz2;
break;
}
case 2: {
Class clazz3 = class$javax$baja$sys$BInteger;
if (clazz3 == null) {
clazz3 = class$javax$baja$sys$BInteger = ComplexIntrospector.class("[Ljavax.baja.sys.BInteger;", false);
}
clazz = clazz3;
break;
}
case 3: {
Class clazz4 = class$javax$baja$sys$BLong;
if (clazz4 == null) {
clazz4 = clazz = (class$javax$baja$sys$BLong = ComplexIntrospector.class("[Ljavax.baja.sys.BLong;", false));
}
if (!(nProperty.value instanceof BInteger)) break;
nProperty.value = BLong.make(((BInteger)nProperty.value).getInt());
break;
}
case 4: {
Class clazz5 = class$javax$baja$sys$BFloat;
if (clazz5 == null) {
clazz5 = clazz = (class$javax$baja$sys$BFloat = ComplexIntrospector.class("[Ljavax.baja.sys.BFloat;", false));
}
if (!(nProperty.value instanceof BInteger)) break;
nProperty.value = BFloat.make(((BInteger)nProperty.value).getInt());
break;
}
case 5: {
Class clazz6 = class$javax$baja$sys$BDouble;
if (clazz6 == null) {
clazz6 = clazz = (class$javax$baja$sys$BDouble = ComplexIntrospector.class("[Ljavax.baja.sys.BDouble;", false));
}
if (!(nProperty.value instanceof BInteger)) break;
nProperty.value = BDouble.make(((BInteger)nProperty.value).getInt());
break;
}
case 6: {
Class clazz7 = class$javax$baja$sys$BString;
if (clazz7 == null) {
clazz7 = class$javax$baja$sys$BString = ComplexIntrospector.class("[Ljavax.baja.sys.BString;", false);
}
clazz = clazz7;
break;
}
case 7: {
clazz = nProperty.typeClass;
break;
}
default: {
throw new IllegalStateException();
}
}
Class<?> clazz8 = nProperty.value.getClass();
if (!clazz.isAssignableFrom(clazz8)) {
throw this.err("Property default value is of wrong type " + clazz8.getName() + " != " + clazz.getName(), string);
}
nProperty.init();
return nProperty;
}
protected NTopic mapTopic(NTopic nTopic) throws Exception {
String string = nTopic.name;
String string2 = TextUtil.capitalize((String)string);
Method method = this.methods.getMethod("fire" + string2, MethodMap.wildcard);
if (method == null) {
throw this.err("Missing fire method: fire" + string2, string);
}
if (method.getReturnType() != Void.TYPE) {
throw this.err("Fire method must have void return type", string);
}
Class<?>[] classArray = method.getParameterTypes();
if (classArray.length != 1) {
throw this.err("Fire method must have exactly one parameter", string);
}
nTopic.eventClass = classArray[0];
return nTopic;
}
protected NAction mapAction(NAction nAction) throws Exception {
Method method;
String string = nAction.name;
String string2 = TextUtil.capitalize((String)string);
Method method2 = this.methods.getMethod(string, MethodMap.noParams);
if (method2 == null) {
method2 = this.methods.getMethod(string, MethodMap.wildcard);
}
if (method2 == null) {
throw this.err("Missing action method", string);
}
if (!this.isPublic(method2)) {
throw this.err("Action method must be public", string);
}
if (this.isStatic(method2)) {
throw this.err("Action method must be not be static", string);
}
Class<?> clazz = method2.getReturnType();
if (clazz == Void.TYPE) {
nAction.returnClass = null;
} else {
Class clazz2 = class$javax$baja$sys$BValue;
if (clazz2 == null) {
clazz2 = class$javax$baja$sys$BValue = ComplexIntrospector.class("[Ljavax.baja.sys.BValue;", false);
}
if (!clazz2.isAssignableFrom(clazz)) {
throw this.err("Action return type must be BValue", string);
}
nAction.returnClass = clazz;
}
Class<?>[] classArray = method2.getParameterTypes();
if (classArray.length > 1) {
throw this.err("Action must specify zero or one parameter", string);
}
if (classArray.length == 0) {
if (nAction.parameterDefault != null) {
throw this.err("Action has parameter default, but no parameter", string);
}
} else {
if (nAction.parameterDefault == null) {
throw this.err("Action has parameter, but no parameter default", string);
}
Class clazz3 = class$javax$baja$sys$BValue;
if (clazz3 == null) {
clazz3 = class$javax$baja$sys$BValue = ComplexIntrospector.class("[Ljavax.baja.sys.BValue;", false);
}
if (!clazz3.isAssignableFrom(classArray[0])) {
throw this.err("Action parameter type must be BValue", string);
}
if (!classArray[0].isAssignableFrom(nAction.parameterDefault.getClass())) {
throw this.err("Action parameter default has invalid type", string);
}
nAction.parameterClass = classArray[0];
}
if ((method = classArray.length == 0 ? this.methods.getMethod("do" + string2, MethodMap.noParams) : this.methods.getMethod("do" + string2, classArray[0])) == null) {
if (classArray.length == 0) {
String string3 = "do" + string2;
Class[] classArray2 = new Class[1];
Class clazz4 = class$javax$baja$sys$Context;
if (clazz4 == null) {
clazz4 = class$javax$baja$sys$Context = ComplexIntrospector.class("[Ljavax.baja.sys.Context;", false);
}
classArray2[0] = clazz4;
method = this.methods.getMethod(string3, classArray2);
} else {
String string4 = "do" + string2;
Class[] classArray3 = new Class[2];
classArray3[0] = classArray[0];
Class clazz5 = class$javax$baja$sys$Context;
if (clazz5 == null) {
clazz5 = class$javax$baja$sys$Context = ComplexIntrospector.class("[Ljavax.baja.sys.Context;", false);
}
classArray3[1] = clazz5;
method = this.methods.getMethod(string4, classArray3);
}
if (method == null) {
throw this.err("Missing action do method", "do" + string2);
}
nAction.doTakesContext = true;
}
if (!this.isPublic(method)) {
throw this.err("Do action method must be public", string2);
}
if (this.isStatic(method)) {
throw this.err("Do action method must be not be static", string2);
}
if (clazz != method.getReturnType()) {
throw this.err("Action method and do method have mismatched signature", nAction.name);
}
return nAction;
}
protected void checkSuperSlotInitialized(Field field) {
try {
NSlot nSlot = (NSlot)field.get(null);
if (nSlot.name == null) {
ArrayList<NSlot> arrayList;
if (this.superSlotsToFix == null) {
this.superSlotsToFix = new HashMap();
}
if ((arrayList = (ArrayList<NSlot>)this.superSlotsToFix.get(field.getName())) == null) {
arrayList = new ArrayList<NSlot>();
this.superSlotsToFix.put(field.getName(), arrayList);
}
arrayList.add(nSlot);
}
}
catch (Throwable throwable) {
throwable.printStackTrace();
}
}
protected void fixSuperSlots() {
Iterator iterator = this.superSlotsToFix.keySet().iterator();
while (iterator.hasNext()) {
String string = (String)iterator.next();
ArrayList arrayList = (ArrayList)this.superSlotsToFix.get(string);
int n = 0;
while (n < arrayList.size()) {
NSlot nSlot = (NSlot)arrayList.get(n);
int n2 = 0;
while (n2 < this.slots.length) {
NSlot nSlot2 = this.slots[n2];
if (nSlot2.name.equals(string)) {
nSlot.copyFrom(nSlot2);
break;
}
++n2;
}
++n;
}
}
}
protected void generateSlotMapClass() throws Exception {
String string = this.cls.getName().replace('.', '_');
String string2 = "auto." + string;
String string3 = "auto/" + string;
String string4 = this.isComponent ? "com/tridium/sys/schema/ComponentSlotMap" : "com/tridium/sys/schema/ComplexSlotMap";
Buffer buffer = new Compiler(string4, string3, this.cls, this.slots).compile();
Class clazz = AutoClassLoader.load(this.cls, string2, buffer);
this.slotMap = (ComplexSlotMap)clazz.newInstance();
}
static /* synthetic */ Class class(String string, boolean bl) {
try {
Class<?> clazz = Class.forName(string);
if (!bl) {
clazz = clazz.getComponentType();
}
return clazz;
}
catch (ClassNotFoundException classNotFoundException) {
throw new NoClassDefFoundError(classNotFoundException.getMessage());
}
}
public ComplexIntrospector(int n, Class clazz) {
super(n, clazz);
this.methods = new MethodMap(clazz);
Class clazz2 = class$javax$baja$sys$BComponent;
if (clazz2 == null) {
clazz2 = class$javax$baja$sys$BComponent = ComplexIntrospector.class("[Ljavax.baja.sys.BComponent;", false);
}
this.isComponent = clazz2.isAssignableFrom(clazz);
}
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
static class TypeSpec {
final Class cls;
final int typeAccess;
static /* synthetic */ Class class$javax$baja$sys$BComponent;
static /* synthetic */ Class class$javax$baja$sys$BObject;
static /* synthetic */ Class class$javax$baja$sys$BValue;
static /* synthetic */ Class class$javax$baja$sys$BComplex;
boolean isError() {
boolean bl = false;
if (this.typeAccess == -1) {
bl = true;
}
return bl;
}
boolean isBWrapper() {
String string = this.cls.getName();
if (string.startsWith("javax.baja.sys.B")) {
string = string.substring(15);
boolean bl = false;
if (string.equals("BBoolean") || string.equals("BInteger") || string.equals("BLong") || string.equals("BFloat") || string.equals("BDouble") || string.equals("BString")) {
bl = true;
}
return bl;
}
return false;
}
boolean isPotentialComponent() {
boolean bl;
block8: {
block7: {
bl = false;
Class clazz = class$javax$baja$sys$BComponent;
if (clazz == null) {
clazz = class$javax$baja$sys$BComponent = TypeSpec.class("[Ljavax.baja.sys.BComponent;", false);
}
if (clazz.isAssignableFrom(this.cls)) break block7;
Class clazz2 = class$javax$baja$sys$BObject;
if (clazz2 == null) {
clazz2 = class$javax$baja$sys$BObject = TypeSpec.class("[Ljavax.baja.sys.BObject;", false);
}
if (this.cls == clazz2) break block7;
Class clazz3 = class$javax$baja$sys$BValue;
if (clazz3 == null) {
clazz3 = class$javax$baja$sys$BValue = TypeSpec.class("[Ljavax.baja.sys.BValue;", false);
}
if (this.cls == clazz3) break block7;
Class clazz4 = class$javax$baja$sys$BComplex;
if (clazz4 == null) {
clazz4 = class$javax$baja$sys$BComplex = TypeSpec.class("[Ljavax.baja.sys.BComplex;", false);
}
if (this.cls != clazz4) break block8;
}
bl = true;
}
return bl;
}
public String toString() {
return this.cls.getName();
}
static /* synthetic */ Class class(String string, boolean bl) {
try {
Class<?> clazz = Class.forName(string);
if (!bl) {
clazz = clazz.getComponentType();
}
return clazz;
}
catch (ClassNotFoundException classNotFoundException) {
throw new NoClassDefFoundError(classNotFoundException.getMessage());
}
}
TypeSpec(Class clazz) {
this.cls = clazz;
this.typeAccess = Utils.getTypeAccess(clazz);
}
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,106 @@
/*
* Decompiled with CFR 0.152.
*/
package com.tridium.sys.schema;
import com.tridium.sys.schema.ComplexIntrospector;
import com.tridium.sys.schema.ComplexSlotMap;
import com.tridium.sys.schema.NAction;
import com.tridium.sys.schema.NProperty;
import com.tridium.sys.schema.NSlot;
import com.tridium.sys.schema.NTopic;
import com.tridium.sys.schema.NType;
import java.util.Hashtable;
import javax.baja.sys.BObject;
import javax.baja.sys.BValue;
import javax.baja.sys.Property;
import javax.baja.sys.Slot;
import javax.baja.sys.TypeIntrospectionException;
public class ComplexType
extends NType {
final ComplexSlotMap slotMap;
protected NSlot[] slots;
NProperty[] properties;
NAction[] actions;
NTopic[] topics;
protected Hashtable byName;
BValue defaultInstance;
int[] defaultFlags;
public BObject getInstance() {
try {
return this.slotMap.newBComplexInstance();
}
catch (NoSuchMethodError noSuchMethodError) {
throw new UnsupportedOperationException("Default constructor not available for " + this);
}
}
public ComplexSlotMap newSlotMap() {
return this.slotMap.newSlotMapInstance();
}
public Slot getSlot(String string) {
return this.slotMap.getSlot(string);
}
public NSlot[] getFrozenSlots() {
return (NSlot[])this.slots.clone();
}
public Property getProperty(String string) {
return (Property)this.slotMap.getSlot(string);
}
public NProperty[] getFrozenProperties() {
return (NProperty[])this.properties.clone();
}
public ComplexType(ComplexIntrospector complexIntrospector) {
super(complexIntrospector);
this.slotMap = complexIntrospector.slotMap;
this.slots = complexIntrospector.slots;
this.properties = complexIntrospector.properties;
this.actions = complexIntrospector.actions;
this.topics = complexIntrospector.topics;
this.byName = new Hashtable(this.slots.length * 2 + 3);
this.defaultFlags = new int[this.slots.length];
int n = 0;
while (n < this.slots.length) {
NSlot nSlot = this.slots[n];
this.defaultFlags[n] = nSlot.flags;
if (nSlot.declaringType == null) {
nSlot.declaringType = this;
}
if (this.byName.put(nSlot.name, nSlot) != null) {
throw new TypeIntrospectionException(this.typeClass, "Duplicate slots: " + nSlot.name);
}
++n;
}
}
public ComplexType(ComplexType complexType) {
super(complexType);
this.slotMap = complexType.slotMap;
this.slots = complexType.slots;
this.properties = complexType.properties;
this.actions = complexType.actions;
this.topics = complexType.topics;
this.byName = new Hashtable(this.slots.length * 2 + 3);
this.defaultFlags = new int[this.slots.length];
int n = 0;
while (n < this.slots.length) {
NSlot nSlot = this.slots[n];
this.defaultFlags[n] = nSlot.flags;
if (nSlot.declaringType == null) {
nSlot.declaringType = this;
}
if (this.byName.put(nSlot.name, nSlot) != null) {
throw new TypeIntrospectionException(this.typeClass, "Duplicate slots: " + nSlot.name);
}
++n;
}
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,211 @@
/*
* Decompiled with CFR 0.152.
*/
package com.tridium.sys.schema;
import com.tridium.sys.schema.NProperty;
import javax.baja.sys.Property;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
final class DynamicTable {
static final NProperty[] EMPTY = new NProperty[0];
final int baseIndex;
NProperty[] slots;
NProperty[] alpha;
int count;
final NProperty get(String string) {
NProperty[] nPropertyArray = this.alpha;
int n = -1;
int n2 = this.count;
while (n2 - n > 1) {
int n3 = (n2 + n) / 2;
int n4 = string.compareTo(nPropertyArray[n3].name);
if (n4 < 0) {
n2 = n3;
continue;
}
if (n4 > 0) {
n = n3;
continue;
}
return nPropertyArray[n3];
}
return null;
}
final void put(NProperty nProperty) {
NProperty nProperty2;
if (this.slots.length <= this.count) {
this.ensureCapacity(Math.max(8, this.count * 2));
}
if ((nProperty2 = this.insert(nProperty)) != null) {
int n = nProperty2.index - this.baseIndex;
System.arraycopy(this.slots, n + 1, this.slots, n, this.count - n - 1);
--this.count;
}
this.slots[this.count] = nProperty;
++this.count;
this.updateIndices();
}
private final NProperty insert(NProperty nProperty) {
NProperty[] nPropertyArray = this.alpha;
String string = nProperty.name;
if (this.count == 0) {
nPropertyArray[0] = nProperty;
return null;
}
if (this.count == 1) {
int n = string.compareTo(nPropertyArray[0].name);
if (n == 0) {
NProperty nProperty2 = nPropertyArray[0];
nPropertyArray[0] = nProperty;
return nProperty2;
}
if (n < 0) {
nPropertyArray[1] = nPropertyArray[0];
nPropertyArray[0] = nProperty;
} else {
nPropertyArray[1] = nProperty;
}
return null;
}
int n = 0;
int n2 = this.count - 1;
int n3 = (n2 - n) / 2;
while (n <= n2) {
int n4 = string.compareTo(nPropertyArray[n3].name);
if (n4 == 0) {
NProperty nProperty3 = nPropertyArray[n3];
nPropertyArray[n3] = nProperty;
return nProperty3;
}
if (n4 < 0) {
n4 = string.compareTo(nPropertyArray[n].name);
if (n4 == 0) {
NProperty nProperty4 = nPropertyArray[n];
nPropertyArray[n] = nProperty;
return nProperty4;
}
if (n4 < 0) {
n3 = n;
break;
}
n2 = n3 - 1;
} else {
n4 = string.compareTo(nPropertyArray[n2].name);
if (n4 == 0) {
NProperty nProperty5 = nPropertyArray[n2];
nPropertyArray[n2] = nProperty;
return nProperty5;
}
if (n4 > 0) {
n3 = n2 + 1;
break;
}
n = n3 + 1;
}
n3 = n + (n2 - n) / 2;
}
System.arraycopy(nPropertyArray, n3, nPropertyArray, n3 + 1, this.count - n3);
nPropertyArray[n3] = nProperty;
return null;
}
final void remove(NProperty nProperty) {
this.remove(nProperty.name);
int n = nProperty.index - this.baseIndex;
System.arraycopy(this.slots, n + 1, this.slots, n, this.count - n - 1);
this.slots[this.count - 1] = null;
--this.count;
this.updateIndices();
}
final void reorder(Property[] propertyArray) {
System.arraycopy(propertyArray, 0, this.slots, 0, this.count);
this.updateIndices();
}
private final void remove(String string) {
NProperty[] nPropertyArray = this.alpha;
int n = -1;
int n2 = this.count;
while (n2 - n > 1) {
int n3 = (n2 + n) / 2;
int n4 = string.compareTo(nPropertyArray[n3].name);
if (n4 < 0) {
n2 = n3;
continue;
}
if (n4 > 0) {
n = n3;
continue;
}
System.arraycopy(nPropertyArray, n3 + 1, nPropertyArray, n3, this.count - n3 - 1);
nPropertyArray[this.count - 1] = null;
return;
}
throw new IllegalStateException(string);
}
final void copyInto(Object[] objectArray, int n) {
System.arraycopy(this.slots, 0, objectArray, n, this.count);
}
final void ensureCapacity(int n) {
if (this.alpha.length < n) {
NProperty[] nPropertyArray = new NProperty[n];
System.arraycopy(this.slots, 0, nPropertyArray, 0, this.count);
this.slots = nPropertyArray;
nPropertyArray = new NProperty[n];
System.arraycopy(this.alpha, 0, nPropertyArray, 0, this.count);
this.alpha = nPropertyArray;
}
}
final void clear() {
this.slots = EMPTY;
this.alpha = EMPTY;
this.count = 0;
}
final boolean equivalent(DynamicTable dynamicTable) {
if (dynamicTable == null) {
return false;
}
if (this.count != dynamicTable.count) {
return false;
}
int n = 0;
while (n < this.count) {
if (!this.alpha[n].equivalent(dynamicTable.alpha[n])) {
return false;
}
++n;
}
return true;
}
private final void updateIndices() {
int n = 0;
while (n < this.count) {
this.slots[n].index = this.baseIndex + n;
++n;
}
}
private final /* synthetic */ void this() {
this.slots = EMPTY;
this.alpha = EMPTY;
this.count = 0;
}
DynamicTable(int n) {
this.this();
this.baseIndex = n;
}
}
@@ -0,0 +1,84 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* javax.baja.nre.util.IntHashMap
*/
package com.tridium.sys.schema;
import com.tridium.sys.schema.EnumType;
import com.tridium.sys.schema.Introspector;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.HashMap;
import javax.baja.nre.util.IntHashMap;
import javax.baja.sys.BFrozenEnum;
import javax.baja.sys.Type;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
class EnumIntrospector
extends Introspector {
BFrozenEnum def;
IntHashMap byOrdinal;
HashMap byTag;
int[] ordinals;
int count;
Type introspect() throws Exception {
int n = this.cls.getModifiers();
if (this.cls.getName().equals("javax.baja.sys.BFrozenEnum") || Modifier.isAbstract(n)) {
return new EnumType(this, null, null, null, null);
}
if (!Modifier.isFinal(n)) {
throw this.err("BFrozenEnum's must be final classes");
}
this.mapEnums();
int[] nArray = new int[this.count];
System.arraycopy(this.ordinals, 0, nArray, 0, this.count);
return new EnumType(this, this.def, nArray, this.byOrdinal, this.byTag);
}
protected void mapEnums() throws Exception {
Field[] fieldArray = this.cls.getFields();
int n = 0;
while (n < fieldArray.length) {
Field field = fieldArray[n];
int n2 = field.getModifiers();
if (Modifier.isPublic(n2) && Modifier.isStatic(n2) && Modifier.isFinal(n2) && field.getType() == this.cls && !field.getName().equals("DEFAULT")) {
this.mapEnum(field.getName(), (BFrozenEnum)field.get(null));
}
++n;
}
if (this.byOrdinal.size() == 0) {
throw this.err("Must declare at least one enum");
}
}
private final void mapEnum(String string, BFrozenEnum bFrozenEnum) throws Exception {
int n = bFrozenEnum.getOrdinal();
this.ordinals[this.count++] = n;
if (this.byOrdinal.get(n) != null) {
throw this.err("Duplicate ordinal " + n);
}
if (this.def == null) {
this.def = bFrozenEnum;
}
EnumType.Entry entry = new EnumType.Entry(n, string, bFrozenEnum);
this.byOrdinal.put(n, (Object)entry);
this.byTag.put(string, entry);
}
private final /* synthetic */ void this() {
this.byOrdinal = new IntHashMap();
this.byTag = new HashMap();
this.ordinals = new int[1024];
}
EnumIntrospector(int n, Class clazz) {
super(n, clazz);
this.this();
}
}
@@ -0,0 +1,138 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* javax.baja.nre.util.IntHashMap
* javax.baja.nre.util.TextUtil
*/
package com.tridium.sys.schema;
import com.tridium.sys.schema.EnumIntrospector;
import com.tridium.sys.schema.SimpleType;
import java.util.HashMap;
import javax.baja.nre.util.IntHashMap;
import javax.baja.nre.util.TextUtil;
import javax.baja.sys.BEnumRange;
import javax.baja.sys.BFrozenEnum;
import javax.baja.sys.Context;
import javax.baja.sys.InvalidEnumException;
import javax.baja.util.Lexicon;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class EnumType
extends SimpleType {
int[] ordinals;
IntHashMap byOrdinal;
HashMap byTag;
BEnumRange range;
public int[] getOrdinals() {
if (this.ordinals == null) {
return null;
}
int[] nArray = new int[this.ordinals.length];
System.arraycopy(this.ordinals, 0, nArray, 0, this.ordinals.length);
return nArray;
}
public boolean isOrdinal(int n) {
boolean bl = false;
if (this.byOrdinal.get(n) != null) {
bl = true;
}
return bl;
}
public String getTag(int n) {
return this.getEntry((int)n).tag;
}
public String getDisplayTag(int n, Context context) {
Entry entry = this.getEntry(n);
try {
String string = this.module.getModuleName();
String string2 = Lexicon.make(string, context).get(entry.tag);
if (string2 != null) {
return string2;
}
}
catch (Throwable throwable) {
throwable.printStackTrace();
}
return entry.displayTag;
}
public BFrozenEnum get(int n) {
return this.getEntry((int)n).frozen;
}
public BFrozenEnum get(String string) {
return this.getEntry((String)string).frozen;
}
public boolean isTag(String string) {
boolean bl = false;
if (this.byTag.get(string) != null) {
bl = true;
}
return bl;
}
public int tagToOrdinal(String string) {
return this.getEntry((String)string).ordinal;
}
public BEnumRange getRange(boolean bl) {
if (this.range == null && bl) {
this.range = BEnumRange.make(this);
}
return this.range;
}
Entry getEntry(int n) {
Entry entry = (Entry)this.byOrdinal.get(n);
if (entry == null) {
throw new InvalidEnumException(n);
}
return entry;
}
Entry getEntry(String string) {
Entry entry = (Entry)this.byTag.get(string);
if (entry == null) {
throw new InvalidEnumException(string);
}
return entry;
}
private final /* synthetic */ void this() {
this.byOrdinal = new IntHashMap();
this.byTag = new HashMap();
}
EnumType(EnumIntrospector enumIntrospector, BFrozenEnum bFrozenEnum, int[] nArray, IntHashMap intHashMap, HashMap hashMap) {
super(enumIntrospector, bFrozenEnum, '\u0000');
this.this();
this.ordinals = nArray;
this.byOrdinal = intHashMap;
this.byTag = hashMap;
this.range = BEnumRange.make(this);
}
static class Entry {
int ordinal;
String tag;
String displayTag;
BFrozenEnum frozen;
Entry(int n, String string, BFrozenEnum bFrozenEnum) {
this.ordinal = n;
this.tag = string;
this.displayTag = TextUtil.toFriendly((String)string);
this.frozen = bFrozenEnum;
}
}
}
@@ -0,0 +1,95 @@
/*
* Decompiled with CFR 0.152.
*/
package com.tridium.sys.schema;
public class Fw {
public static final int SLOT_MAP = 1;
public static final int CHANGED = 2;
public static final int ADDED = 3;
public static final int REMOVED = 4;
public static final int RENAMED = 5;
public static final int REORDERED = 6;
public static final int PARENTED = 7;
public static final int UNPARENTED = 8;
public static final int INVOKED = 9;
public static final int FIRED = 10;
public static final int STARTED = 11;
public static final int STOPPED = 12;
public static final int DESCENDANTS_STARTED = 13;
public static final int DESCENDANTS_STOPPED = 14;
public static final int SERVICE_STARTED = 15;
public static final int SERVICE_STOPPED = 16;
public static final int SUBSCRIBED = 17;
public static final int UNSUBSCRIBED = 18;
public static final int GET_OVERRIDE = 19;
public static final int AT_STEADY_STATE = 20;
public static final int RR = 21;
public static final int TOTAL_EXECUTE_TIME = 22;
public static final int STATION_STARTED = 23;
public static final int SELF_GOVERNED_NAME = 24;
public static final int SELF_GOVERNED_DISPLAY_NAME = 25;
public static final int MOUNT = 101;
public static final int UNMOUNT = 102;
public static final int GENERATE_HANDLES = 103;
public static final int ENSURE_LOADED = 104;
public static final int HOLD_MIX_IN_UPDATES = 105;
public static final int DELETE_PROPS = 106;
public static final int UNDELETE_PROPS = 107;
public static final int SET_SPACE = 108;
public static final int RPC = 109;
public static final int TOUCH = 110;
public static final int GENERATE_UNIQUE_NAME = 111;
public static final int MAKE_DELETE_OP = 112;
public static final int MAKE_INTRA_MOVE = 113;
public static final int MAKE_COMP_TRANSFER = 114;
public static final int MAKE_FILE_COMP_TRANSFER = 115;
public static final int GET_COMPONENT = 116;
public static final int SKIP_INTERN = 116;
public static final int GET_AWT = 201;
public static final int SET_AWT = 202;
public static final int GET_IMAGE = 203;
public static final int SET_IMAGE = 204;
public static final int SET_BASE_ORD = 205;
public static final int GET_PEER = 206;
public static final int IS_WIDGET = 301;
public static final int GET_BINDER = 302;
public static final int UPDATE_BINDING = 303;
public static final int PX_EDITOR = 304;
public static final int SHOW_ACCELERATORS = 305;
public static final int UPDATE_COLORS = 306;
public static final int PX_INCLUDE = 307;
public static final int ACTIVATED = 401;
public static final int DEACTIVATED = 402;
public static final int MAKE_BINDER = 403;
public static final int GET_REMOTE_VERSION = 404;
public static final int GET_MODULE = 405;
public static final int CHECK_LICENSE_LIMIT = 501;
public static final int GET_ALARM_SUPPORT = 502;
public static final int GET_LICENSE_COUNT = 503;
public static final int GET_ALARM_QUEUE = 601;
public static final int GET_ALARM_STORE = 602;
public static final int ORION_TABLE_DEF = 701;
public static final int ORION_INIT_ORIG = 702;
public static final int ORION_GET_ORIG_VALUE = 703;
public static final int FOX_SESSION = 801;
public static final int STATION_FOX_SESSION = 802;
public static final int FOX_SESSION_TYPE = 803;
public static final int FOX_UNAUTHENTICATED_MSG = 804;
public static final int FOXS_SESSION = 805;
public static final int STATION_FOXS_SESSION = 806;
public static final int ADD_UNRESTRICTED_FILE_PATH = 901;
public static final int REMOVE_UNRESTRICTED_FILE_PATH = 902;
public static final int INITIALIZE_PLATFORM = 1001;
public static final int INIT_DATA_RECOVERY_RESTORE = 1002;
public static final int RETRIEVE_TIMEZONE_ERA = 1101;
public static final int CREATE_TIMEZONE_FROM_HISTORICAL = 1102;
public static final int CREATE_RULE_FROM_HISTORICAL = 1103;
public static final int GET_TABLE_HANDLE = 1200;
public static final int USER_DEFINED_0 = 9900;
public static final int USER_DEFINED_1 = 9901;
public static final int USER_DEFINED_2 = 9902;
public static final int USER_DEFINED_3 = 9903;
public static final int USER_DEFINED_4 = 9904;
}
@@ -0,0 +1,20 @@
/*
* Decompiled with CFR 0.152.
*/
package com.tridium.sys.schema;
import com.tridium.sys.schema.InterfaceType;
import com.tridium.sys.schema.Introspector;
import javax.baja.sys.Type;
class InterfaceIntrospector
extends Introspector {
Type introspect() throws Exception {
return new InterfaceType(this);
}
InterfaceIntrospector(int n, Class clazz) {
super(n, clazz);
}
}
@@ -0,0 +1,25 @@
/*
* Decompiled with CFR 0.152.
*/
package com.tridium.sys.schema;
import com.tridium.sys.schema.InterfaceIntrospector;
import com.tridium.sys.schema.NType;
import javax.baja.sys.BObject;
import javax.baja.sys.InterfaceTypeException;
public class InterfaceType
extends NType {
public final BObject getInstance() {
throw new InterfaceTypeException(this.toString());
}
public boolean isInterface() {
return true;
}
InterfaceType(InterfaceIntrospector interfaceIntrospector) {
super(interfaceIntrospector);
}
}
@@ -0,0 +1,291 @@
/*
* Decompiled with CFR 0.152.
*/
package com.tridium.sys.schema;
import com.tridium.sys.Nre;
import com.tridium.sys.module.ModuleClassLoader;
import com.tridium.sys.module.NModule;
import com.tridium.sys.schema.ComplexIntrospector;
import com.tridium.sys.schema.EnumIntrospector;
import com.tridium.sys.schema.InterfaceIntrospector;
import com.tridium.sys.schema.NType;
import com.tridium.sys.schema.ObjectIntrospector;
import com.tridium.sys.schema.SchemaManager;
import com.tridium.sys.schema.SimpleIntrospector;
import com.tridium.sys.schema.SingletonIntrospector;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.Member;
import java.lang.reflect.Modifier;
import javax.baja.sys.BObject;
import javax.baja.sys.Type;
import javax.baja.sys.TypeIntrospectionException;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public abstract class Introspector {
static Class propertyClass;
static Class actionClass;
static Class topicClass;
Class cls;
int id;
boolean isAbstract;
boolean isFinal;
NModule module;
String typeName;
String facetsPath;
static /* synthetic */ Class class$javax$baja$sys$Property;
static /* synthetic */ Class class$javax$baja$sys$Action;
static /* synthetic */ Class class$javax$baja$sys$Topic;
static /* synthetic */ Class class$javax$baja$sys$BComplex;
static /* synthetic */ Class class$javax$baja$sys$BFrozenEnum;
static /* synthetic */ Class class$javax$baja$sys$BSimple;
static /* synthetic */ Class class$javax$baja$sys$BSingleton;
static /* synthetic */ Class class$java$lang$Class;
static /* synthetic */ Class class$com$tridium$sys$schema$Introspector;
static /* synthetic */ Class class$javax$baja$sys$BObject;
static Introspector create(int n, Class clazz) {
if (clazz.isInterface()) {
return new InterfaceIntrospector(n, clazz);
}
Introspector introspector = Introspector.getCustomIntrospector(n, clazz);
if (introspector != null) {
return introspector;
}
Class clazz2 = class$javax$baja$sys$BComplex;
if (clazz2 == null) {
clazz2 = class$javax$baja$sys$BComplex = Introspector.class("[Ljavax.baja.sys.BComplex;", false);
}
if (clazz2.isAssignableFrom(clazz)) {
return new ComplexIntrospector(n, clazz);
}
Class clazz3 = class$javax$baja$sys$BFrozenEnum;
if (clazz3 == null) {
clazz3 = class$javax$baja$sys$BFrozenEnum = Introspector.class("[Ljavax.baja.sys.BFrozenEnum;", false);
}
if (clazz3.isAssignableFrom(clazz)) {
return new EnumIntrospector(n, clazz);
}
Class clazz4 = class$javax$baja$sys$BSimple;
if (clazz4 == null) {
clazz4 = class$javax$baja$sys$BSimple = Introspector.class("[Ljavax.baja.sys.BSimple;", false);
}
if (clazz4.isAssignableFrom(clazz)) {
return new SimpleIntrospector(n, clazz);
}
Class clazz5 = class$javax$baja$sys$BSingleton;
if (clazz5 == null) {
clazz5 = class$javax$baja$sys$BSingleton = Introspector.class("[Ljavax.baja.sys.BSingleton;", false);
}
if (clazz5.isAssignableFrom(clazz)) {
return new SingletonIntrospector(n, clazz);
}
return new ObjectIntrospector(n, clazz);
}
static Introspector getCustomIntrospector(int n, Class clazz) {
try {
Field field = Introspector.getField("INTROSPECTOR", clazz);
if (field == null) {
return null;
}
Class clazz2 = class$java$lang$Class;
if (clazz2 == null) {
clazz2 = class$java$lang$Class = Introspector.class("[Ljava.lang.Class;", false);
}
if (!clazz2.isAssignableFrom(field.getType())) {
return null;
}
Class clazz3 = (Class)field.get(null);
Class clazz4 = class$com$tridium$sys$schema$Introspector;
if (clazz4 == null) {
clazz4 = class$com$tridium$sys$schema$Introspector = Introspector.class("[Lcom.tridium.sys.schema.Introspector;", false);
}
if (!clazz4.isAssignableFrom(clazz3)) {
return null;
}
Class[] classArray = new Class[2];
classArray[0] = Integer.TYPE;
Class clazz5 = class$java$lang$Class;
if (clazz5 == null) {
clazz5 = class$java$lang$Class = Introspector.class("[Ljava.lang.Class;", false);
}
classArray[1] = clazz5;
Constructor constructor = clazz3.getConstructor(classArray);
return (Introspector)constructor.newInstance(new Integer(n), clazz);
}
catch (Exception exception) {
exception.printStackTrace();
return null;
}
}
/*
* Unable to fully structure code
*/
static Field getField(String var0, Class var1_1) {
var2_2 = var1_1;
if (true) ** GOTO lbl11
do {
var3_3 = null;
try {
var3_3 = var2_2.getDeclaredField(var0);
var3_3.setAccessible(true);
return var3_3;
}
catch (Exception var4_4) {
var2_2 = var2_2.getSuperclass();
}
lbl11:
// 2 sources
if ((v0 = Introspector.class$javax$baja$sys$BObject) != null) continue;
v0 = Introspector.class("[Ljavax.baja.sys.BObject;", false);
} while (var2_2 != v0);
return null;
}
abstract Type introspect() throws Exception;
BObject getConstantFieldObject(String string) throws Exception {
try {
if (this.isAbstract) {
return null;
}
Field field = this.cls.getField(string);
this.checkPublicStaticFinal(field);
if (field.getType() != this.cls) {
throw this.err(string + " field is wrong type");
}
BObject bObject = (BObject)field.get(null);
if (bObject == null) {
throw this.err(string + " field is null; insure getType() comes last");
}
return bObject;
}
catch (TypeIntrospectionException typeIntrospectionException) {
throw typeIntrospectionException;
}
catch (Exception exception) {
throw this.err("Missing or invalid " + string + " field");
}
}
NModule getModule() {
return Introspector.getModule(this.cls, this.typeName);
}
static NModule getModule(Class clazz, String string) {
ClassLoader classLoader = clazz.getClassLoader();
if (classLoader instanceof ModuleClassLoader) {
NModule nModule = ((ModuleClassLoader)classLoader).module;
String string2 = nModule.getTypeClassName(string);
if (string2 == null) {
throw Introspector.err(clazz, "Module does not declare type '" + string + "' in 'module.xml'");
}
if (!string2.equals(clazz.getName())) {
throw Introspector.err(clazz, "Type '" + string + "' should be '" + string2 + '\'');
}
return nModule;
}
NModule[] nModuleArray = Nre.moduleManager.getModules();
int n = 0;
while (n < nModuleArray.length) {
String string3;
if (nModuleArray[n].isSystemJar() && (string3 = nModuleArray[n].getTypeClassName(string)) != null && string3.equals(clazz.getName())) {
return nModuleArray[n];
}
++n;
}
throw Introspector.err(clazz, "Cannot resolve class to module (check 'module.xml')");
}
boolean isPublic(Member member) {
return Modifier.isPublic(member.getModifiers());
}
boolean isStatic(Member member) {
return Modifier.isStatic(member.getModifiers());
}
boolean isPublicStaticFinal(Field field) {
int n = field.getModifiers();
boolean bl = false;
if (Modifier.isPublic(n) && Modifier.isStatic(n) && Modifier.isFinal(n)) {
bl = true;
}
return bl;
}
void checkPublicStaticFinal(Field field) {
if (!this.isPublicStaticFinal(field)) {
throw this.err("Field must be public static final", field.getName());
}
}
public TypeIntrospectionException err(String string) {
return Introspector.err(this.cls, string);
}
public static TypeIntrospectionException err(Class clazz, String string) {
return Introspector.err(clazz, string, null);
}
public TypeIntrospectionException err(String string, String string2) {
return Introspector.err(this.cls, string, string2);
}
public static TypeIntrospectionException err(Class clazz, String string, String string2) {
String string3 = string2 == null ? string : string + " (" + string2 + ')';
String string4 = clazz.getName();
if (clazz.getClassLoader() instanceof ModuleClassLoader) {
NModule nModule = ((ModuleClassLoader)clazz.getClassLoader()).module;
string4 = nModule.getModuleName() + ':' + string4;
}
SchemaManager.log.error(string4 + ": " + string3);
return new TypeIntrospectionException(clazz, string3);
}
static /* synthetic */ Class class(String string, boolean bl) {
try {
Class<?> clazz = Class.forName(string);
if (!bl) {
clazz = clazz.getComponentType();
}
return clazz;
}
catch (ClassNotFoundException classNotFoundException) {
throw new NoClassDefFoundError(classNotFoundException.getMessage());
}
}
protected Introspector(int n, Class clazz) {
this.id = n;
this.cls = clazz;
this.typeName = NType.getTypeName(clazz.getName());
this.module = this.getModule();
this.facetsPath = "/" + clazz.getName().replace('.', '/') + ".facets";
this.isAbstract = Modifier.isAbstract(clazz.getModifiers());
this.isFinal = Modifier.isFinal(clazz.getModifiers());
}
static {
Class clazz;
Class clazz2;
Class clazz3 = class$javax$baja$sys$Property;
if (clazz3 == null) {
clazz3 = propertyClass = (class$javax$baja$sys$Property = Introspector.class("[Ljavax.baja.sys.Property;", false));
}
if ((clazz2 = class$javax$baja$sys$Action) == null) {
clazz2 = actionClass = (class$javax$baja$sys$Action = Introspector.class("[Ljavax.baja.sys.Action;", false));
}
if ((clazz = class$javax$baja$sys$Topic) == null) {
clazz = class$javax$baja$sys$Topic = Introspector.class("[Ljavax.baja.sys.Topic;", false);
}
topicClass = clazz;
}
}
@@ -0,0 +1,132 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* javax.baja.nre.util.TextUtil
*/
package com.tridium.sys.schema;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.HashMap;
import javax.baja.nre.util.TextUtil;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
class MethodMap {
static final Class[] noParams = new Class[0];
static final Class wildcard;
private HashMap map;
private Class[] oneParam;
static /* synthetic */ Class class$com$tridium$sys$schema$MethodMap;
Method getMethod(String string, Class clazz) {
this.oneParam[0] = clazz;
return this.getMethod(string, this.oneParam);
}
Method getMethod(String string, Class[] classArray) {
Object v = this.map.get(string);
if (v != null) {
if (v instanceof Method) {
Method method = (Method)v;
if (this.isMatch(method, classArray)) {
return method;
}
} else {
ArrayList arrayList = (ArrayList)v;
int n = 0;
while (n < arrayList.size()) {
Method method = (Method)arrayList.get(n);
if (this.isMatch(method, classArray)) {
return method;
}
++n;
}
}
}
return null;
}
boolean isMatch(Method method, Class[] classArray) {
Class<?>[] classArray2 = method.getParameterTypes();
if (classArray2.length != classArray.length) {
return false;
}
int n = 0;
while (n < classArray2.length) {
Class clazz = classArray[n];
if (clazz != wildcard && clazz != classArray2[n]) {
return false;
}
++n;
}
return true;
}
String toString(Class[] classArray) {
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append('(');
int n = 0;
while (n < classArray.length) {
if (n > 0) {
stringBuffer.append(',');
}
stringBuffer.append(TextUtil.getClassName((Class)classArray[n]));
++n;
}
stringBuffer.append(')');
return stringBuffer.toString();
}
static /* synthetic */ Class class(String string, boolean bl) {
try {
Class<?> clazz = Class.forName(string);
if (!bl) {
clazz = clazz.getComponentType();
}
return clazz;
}
catch (ClassNotFoundException classNotFoundException) {
throw new NoClassDefFoundError(classNotFoundException.getMessage());
}
}
private final /* synthetic */ void this() {
this.oneParam = new Class[1];
}
MethodMap(Class clazz) {
this.this();
Method[] methodArray = clazz.getMethods();
int n = methodArray.length;
this.map = new HashMap(n * 3);
int n2 = 0;
while (n2 < n) {
Method method = methodArray[n2];
String string = method.getName();
Object v = this.map.get(string);
if (v == null) {
this.map.put(string, method);
} else if (v instanceof Method) {
ArrayList<Object> arrayList = new ArrayList<Object>(5);
arrayList.add(v);
arrayList.add(method);
this.map.put(string, arrayList);
} else {
((ArrayList)v).add(method);
}
++n2;
}
}
static {
Class clazz = class$com$tridium$sys$schema$MethodMap;
if (clazz == null) {
clazz = class$com$tridium$sys$schema$MethodMap = MethodMap.class("[Lcom.tridium.sys.schema.MethodMap;", false);
}
wildcard = clazz;
}
}
@@ -0,0 +1,110 @@
/*
* Decompiled with CFR 0.152.
*/
package com.tridium.sys.schema;
import com.tridium.sys.schema.NSlot;
import javax.baja.sys.Action;
import javax.baja.sys.BFacets;
import javax.baja.sys.BValue;
import javax.baja.sys.Property;
import javax.baja.sys.Sys;
import javax.baja.sys.Topic;
import javax.baja.sys.Type;
public class NAction
extends NSlot
implements Action {
Class parameterClass;
Class returnClass;
Type parameterType;
Type returnType;
BValue parameterDefault;
boolean doTakesContext;
public final boolean isProperty() {
return false;
}
public final boolean isAction() {
return true;
}
public final boolean isTopic() {
return false;
}
public final Property asProperty() {
throw new ClassCastException();
}
public final Action asAction() {
return this;
}
public final Topic asTopic() {
throw new ClassCastException();
}
public final Type getParameterType() {
if (this.parameterClass == null) {
return null;
}
if (this.parameterType == null) {
this.parameterType = Sys.getType(this.parameterClass);
}
return this.parameterType;
}
public final BValue getParameterDefault() {
if (this.parameterDefault == null) {
return null;
}
return this.parameterDefault.newCopy();
}
public final Type getReturnType() {
if (this.returnClass == null) {
return null;
}
if (this.returnType == null) {
this.returnType = Sys.getType(this.returnClass);
}
return this.returnType;
}
public String toString() {
return NAction.toString(this);
}
void copyFrom(NSlot nSlot) {
super.copyFrom(nSlot);
NAction nAction = (NAction)nSlot;
this.parameterClass = nAction.parameterClass;
this.parameterType = nAction.parameterType;
this.returnClass = nAction.returnClass;
this.returnType = nAction.returnType;
}
static String toString(Action action) {
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append(action.getName());
stringBuffer.append('(');
try {
if (action.getParameterType() != null) {
stringBuffer.append(action.getParameterType());
}
}
catch (Exception exception) {
stringBuffer.append(exception);
}
stringBuffer.append(')');
return stringBuffer.toString();
}
public NAction(int n, BValue bValue, BFacets bFacets) {
super(null, n, bFacets, true);
this.parameterDefault = bValue;
}
}
@@ -0,0 +1,53 @@
/*
* Decompiled with CFR 0.152.
*/
package com.tridium.sys.schema;
import com.tridium.sys.schema.NAction;
import com.tridium.sys.schema.NProperty;
import javax.baja.sys.Action;
import javax.baja.sys.BAction;
import javax.baja.sys.BFacets;
import javax.baja.sys.BValue;
import javax.baja.sys.Type;
public class NActionProperty
extends NProperty
implements Action {
public final boolean isAction() {
return true;
}
public final Action asAction() {
return this;
}
public final Type getParameterType() {
return ((BAction)this.value).getParameterType();
}
public final Type getReturnType() {
return ((BAction)this.value).getReturnType();
}
public final BValue getParameterDefault() {
return ((BAction)this.value).getParameterDefault();
}
public BFacets getFacets() {
BFacets bFacets = ((BAction)this.value).getFacets();
if (bFacets == null || bFacets.isNull()) {
return super.getFacets();
}
return bFacets;
}
public String toString() {
return NAction.toString(this);
}
public NActionProperty(String string, int n, BAction bAction, BFacets bFacets) {
super(string, n, bAction, bFacets);
}
}
@@ -0,0 +1,136 @@
/*
* Decompiled with CFR 0.152.
*/
package com.tridium.sys.schema;
import com.tridium.sys.schema.NSlot;
import com.tridium.sys.schema.Utils;
import java.lang.reflect.Modifier;
import javax.baja.sys.Action;
import javax.baja.sys.BFacets;
import javax.baja.sys.BObject;
import javax.baja.sys.BValue;
import javax.baja.sys.Property;
import javax.baja.sys.Sys;
import javax.baja.sys.Topic;
import javax.baja.sys.Type;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class NProperty
extends NSlot
implements Property {
public static final int TYPE_FINAL = 1;
public BValue value;
Class typeClass;
Type type;
int typeAccess;
int propertyFlags;
void init() {
if (Modifier.isFinal(this.typeClass.getModifiers())) {
this.propertyFlags |= 1;
}
}
public final boolean isProperty() {
return true;
}
public boolean isAction() {
return false;
}
public boolean isTopic() {
return false;
}
public final Property asProperty() {
return this;
}
public Action asAction() {
throw new ClassCastException();
}
public Topic asTopic() {
throw new ClassCastException();
}
public final int getTypeAccess() {
return this.typeAccess;
}
public final BValue getDefaultValue() {
return this.value.newCopy(true);
}
public final boolean isEquivalentToDefaultValue(BValue bValue) {
return this.value.equivalent(bValue);
}
public final Type getType() {
if (this.type == null) {
this.type = Sys.getType(this.typeClass);
}
return this.type;
}
public final Type getType(BObject bObject) {
return this.getType();
}
public final boolean isTypeFinal() {
boolean bl = false;
if ((this.propertyFlags & 1) != 0) {
bl = true;
}
return bl;
}
boolean equivalent(NProperty nProperty) {
if (!super.equivalent(nProperty)) {
return false;
}
return this.value.equivalent(nProperty.value);
}
void copyFrom(NSlot nSlot) {
super.copyFrom(nSlot);
NProperty nProperty = (NProperty)nSlot;
this.type = nProperty.type;
this.typeClass = nProperty.typeClass;
this.typeAccess = nProperty.typeAccess;
this.propertyFlags = nProperty.propertyFlags;
}
public String toString() {
return this.name + ": " + this.getType();
}
private final /* synthetic */ void this() {
this.typeAccess = -1;
}
public NProperty(int n, BValue bValue, BFacets bFacets) {
super(null, n, bFacets, true);
this.this();
this.value = bValue;
}
public NProperty(String string, int n, BValue bValue, BFacets bFacets) {
this(string, n, bValue, bFacets, false);
}
public NProperty(String string, int n, BValue bValue, BFacets bFacets, boolean bl) {
super(string, n, bFacets, bl);
this.this();
this.value = bValue;
this.type = bValue.getType();
this.typeClass = bValue.getClass();
this.typeAccess = Utils.getTypeAccess(this.typeClass);
this.init();
}
}
@@ -0,0 +1,101 @@
/*
* Decompiled with CFR 0.152.
*/
package com.tridium.sys.schema;
import com.tridium.sys.engine.SlotKnobs;
import javax.baja.naming.SlotPath;
import javax.baja.sys.BFacets;
import javax.baja.sys.Context;
import javax.baja.sys.Slot;
import javax.baja.sys.Type;
import javax.baja.util.Lexicon;
public abstract class NSlot
implements Slot {
public int index;
Type declaringType;
String name;
String displayName;
int flags;
boolean isFrozen;
SlotKnobs knobs;
BFacets facets;
public final Type getDeclaringType() {
return this.declaringType;
}
public final String getName() {
return this.name;
}
public final String getDefaultDisplayName(Context context) {
try {
String string = this.declaringType.getModule().getModuleName();
String string2 = Lexicon.make(string, context).get(this.name);
if (string2 != null) {
return string2;
}
}
catch (Throwable throwable) {
throwable.printStackTrace();
}
if (this.displayName == null) {
this.displayName = SlotPath.unescape(this.name);
}
return this.displayName;
}
public final boolean isFrozen() {
return this.isFrozen;
}
public final boolean isDynamic() {
return this.isFrozen ^ true;
}
public final int getDefaultFlags() {
return this.flags;
}
public BFacets getFacets() {
return this.facets;
}
public final boolean equals(Object object) {
NSlot nSlot = (NSlot)object;
if (this == nSlot) {
return true;
}
boolean bl = false;
if (this.index == nSlot.index) {
bl = true;
}
return bl;
}
boolean equivalent(NSlot nSlot) {
boolean bl = false;
if (this.name.equals(nSlot.name) && this.flags == nSlot.flags && this.isFrozen == nSlot.isFrozen && this.facets.equals(nSlot.facets)) {
bl = true;
}
return bl;
}
void copyFrom(NSlot nSlot) {
this.index = nSlot.index;
this.declaringType = nSlot.declaringType;
this.name = nSlot.name;
this.displayName = nSlot.displayName;
this.isFrozen = nSlot.isFrozen;
}
NSlot(String string, int n, BFacets bFacets, boolean bl) {
this.name = string;
this.flags = n;
this.facets = bFacets;
this.isFrozen = bl;
}
}
@@ -0,0 +1,110 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* javax.baja.nre.util.TextUtil
*/
package com.tridium.sys.schema;
import com.tridium.sys.schema.NAction;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import javax.baja.nre.util.TextUtil;
import javax.baja.sys.ActionInvokeException;
import javax.baja.sys.BComponent;
import javax.baja.sys.BFacets;
import javax.baja.sys.BValue;
import javax.baja.sys.Context;
import javax.baja.sys.Type;
public class NSyntheticAction
extends NAction {
static final SyntheticActionInvocationHandler DEFAULT_HANDLER = new SyntheticActionInvocationHandler();
SyntheticActionInvocationHandler handler;
public BValue invoke(int n, BComponent bComponent, BValue bValue, Context context) {
return this.handler.invoke(this, bComponent, bValue, context);
}
public NSyntheticAction(int n, BValue bValue, BFacets bFacets) {
this(n, bValue, bFacets, DEFAULT_HANDLER);
}
public NSyntheticAction(int n, BValue bValue, BFacets bFacets, SyntheticActionInvocationHandler syntheticActionInvocationHandler) {
super(n, bValue, bFacets);
this.handler = syntheticActionInvocationHandler;
if (bValue != null) {
this.parameterClass = bValue.getClass();
}
}
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public static class SyntheticActionInvocationHandler {
static /* synthetic */ Class class$javax$baja$sys$Context;
public BValue invoke(NSyntheticAction nSyntheticAction, BComponent bComponent, BValue bValue, Context context) {
Class<?> clazz = bComponent.getClass();
Type type = nSyntheticAction.getParameterType();
try {
if (type == null) {
try {
Method method = clazz.getMethod("do" + TextUtil.capitalize((String)nSyntheticAction.getName()), new Class[0]);
return (BValue)method.invoke((Object)bComponent, new Object[0]);
}
catch (NoSuchMethodException noSuchMethodException) {
String string = "do" + TextUtil.capitalize((String)nSyntheticAction.getName());
Class[] classArray = new Class[1];
Class clazz2 = class$javax$baja$sys$Context;
if (clazz2 == null) {
clazz2 = class$javax$baja$sys$Context = SyntheticActionInvocationHandler.class("[Ljavax.baja.sys.Context;", false);
}
classArray[0] = clazz2;
Method method = clazz.getMethod(string, classArray);
return (BValue)method.invoke((Object)bComponent, bValue, context);
}
}
try {
Method method = clazz.getMethod("do" + TextUtil.capitalize((String)nSyntheticAction.getName()), type.getTypeClass());
return (BValue)method.invoke((Object)bComponent, bValue);
}
catch (NoSuchMethodException noSuchMethodException) {
String string = "do" + TextUtil.capitalize((String)nSyntheticAction.getName());
Class[] classArray = new Class[2];
classArray[0] = type.getTypeClass();
Class clazz3 = class$javax$baja$sys$Context;
if (clazz3 == null) {
clazz3 = class$javax$baja$sys$Context = SyntheticActionInvocationHandler.class("[Ljavax.baja.sys.Context;", false);
}
classArray[1] = clazz3;
Method method = clazz.getMethod(string, classArray);
return (BValue)method.invoke((Object)bComponent, bValue, context);
}
}
catch (IllegalAccessException illegalAccessException) {
throw new ActionInvokeException("Illegal acccess on action invocation callback for '" + nSyntheticAction.getName() + "'.", illegalAccessException);
}
catch (InvocationTargetException invocationTargetException) {
throw new ActionInvokeException("Action invocation callback failed for '" + nSyntheticAction.getName() + "'.", invocationTargetException);
}
catch (NoSuchMethodException noSuchMethodException) {
throw new ActionInvokeException("Action invocation callback undefined for '" + nSyntheticAction.getName() + "'.", noSuchMethodException);
}
}
static /* synthetic */ Class class(String string, boolean bl) {
try {
Class<?> clazz = Class.forName(string);
if (!bl) {
clazz = clazz.getComponentType();
}
return clazz;
}
catch (ClassNotFoundException classNotFoundException) {
throw new NoClassDefFoundError(classNotFoundException.getMessage());
}
}
}
}
@@ -0,0 +1,69 @@
/*
* Decompiled with CFR 0.152.
*/
package com.tridium.sys.schema;
import com.tridium.sys.schema.NSlot;
import javax.baja.sys.Action;
import javax.baja.sys.BFacets;
import javax.baja.sys.Property;
import javax.baja.sys.Sys;
import javax.baja.sys.Topic;
import javax.baja.sys.Type;
public class NTopic
extends NSlot
implements Topic {
Class eventClass;
Type eventType;
public final boolean isProperty() {
return false;
}
public final boolean isAction() {
return false;
}
public final boolean isTopic() {
return true;
}
public final Property asProperty() {
throw new ClassCastException();
}
public final Action asAction() {
throw new ClassCastException();
}
public final Topic asTopic() {
return this;
}
public Type getEventType() {
if (this.eventClass == null) {
return null;
}
if (this.eventType == null) {
this.eventType = Sys.getType(this.eventClass);
}
return this.eventType;
}
void copyFrom(NSlot nSlot) {
super.copyFrom(nSlot);
NTopic nTopic = (NTopic)nSlot;
this.eventClass = nTopic.eventClass;
this.eventType = nTopic.eventType;
}
public String toString() {
return this.name + "! " + this.getEventType();
}
public NTopic(int n, BFacets bFacets) {
super(null, n, bFacets, true);
}
}
@@ -0,0 +1,48 @@
/*
* Decompiled with CFR 0.152.
*/
package com.tridium.sys.schema;
import com.tridium.sys.schema.NProperty;
import javax.baja.sys.BFacets;
import javax.baja.sys.BTopic;
import javax.baja.sys.BValue;
import javax.baja.sys.Topic;
import javax.baja.sys.Type;
public class NTopicProperty
extends NProperty
implements Topic {
public final boolean isTopic() {
return true;
}
public final Topic asTopic() {
return this;
}
public Type getEventType() {
Type type = ((BTopic)this.value).getEventType();
if (type == null) {
type = BValue.TYPE;
}
return type;
}
public BFacets getFacets() {
BFacets bFacets = ((BTopic)this.value).getFacets();
if (bFacets == null || bFacets.isNull()) {
return super.getFacets();
}
return bFacets;
}
public String toString() {
return this.name + "! " + this.getEventType();
}
public NTopicProperty(String string, int n, BTopic bTopic, BFacets bFacets) {
super(string, n, bTopic, bFacets);
}
}
@@ -0,0 +1,200 @@
/*
* Decompiled with CFR 0.152.
*/
package com.tridium.sys.schema;
import com.tridium.sys.module.NModule;
import com.tridium.sys.schema.Introspector;
import java.util.ArrayList;
import javax.baja.registry.TypeInfo;
import javax.baja.sys.AbstractTypeException;
import javax.baja.sys.BModule;
import javax.baja.sys.Context;
import javax.baja.sys.Sys;
import javax.baja.sys.Type;
import javax.baja.util.BTypeSpec;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public abstract class NType
implements Type {
final int id;
final NModule module;
final Class typeClass;
final String typeName;
final boolean isAbstract;
final boolean isFinal;
private Object typeSpec;
private Type[] interfaces;
private Type superType;
private boolean haveSuperType;
protected TypeInfo typeInfo;
private Object fields;
static /* synthetic */ Class class$javax$baja$sys$BInterface;
static /* synthetic */ Class class$java$lang$Object;
public final int getId() {
return this.id;
}
public final BModule getModule() {
return this.module.bmodule();
}
public final Class getTypeClass() {
return this.typeClass;
}
public final String getTypeName() {
return this.typeName;
}
public final String getDisplayName(Context context) {
return this.getTypeInfo().getDisplayName(context);
}
public boolean isInterface() {
return false;
}
public final boolean isAbstract() {
return this.isAbstract;
}
public final boolean isFinal() {
return this.isFinal;
}
public boolean isDataType() {
return false;
}
public char getDataTypeSymbol() {
return '\u0000';
}
public final TypeInfo getTypeInfo() {
if (this.typeInfo == null) {
this.typeInfo = Sys.getRegistry().getType(this.toString());
}
return this.typeInfo;
}
public final boolean is(Type type) {
return this.getTypeInfo().is(type.getTypeInfo());
}
public final boolean is(TypeInfo typeInfo) {
return this.getTypeInfo().is(typeInfo);
}
public boolean isTransient() {
return false;
}
public final Type[] getInterfaces() {
if (this.interfaces == null) {
ArrayList<Type> arrayList = new ArrayList<Type>();
Class<?>[] classArray = this.typeClass.getInterfaces();
int n = 0;
while (n < classArray.length) {
Class<?> clazz = classArray[n];
Class clazz2 = class$javax$baja$sys$BInterface;
if (clazz2 == null) {
clazz2 = NType.class("[Ljavax.baja.sys.BInterface;", false);
}
if (clazz2.isAssignableFrom(clazz)) {
arrayList.add(Sys.getType(clazz));
}
++n;
}
this.interfaces = arrayList.toArray(new Type[arrayList.size()]);
}
return this.interfaces;
}
public final Type getSuperType() {
if (!this.haveSuperType) {
Class clazz = this.typeClass.getSuperclass();
if (clazz != null) {
Class clazz2 = class$java$lang$Object;
if (clazz2 == null) {
clazz2 = class$java$lang$Object = NType.class("[Ljava.lang.Object;", false);
}
if (clazz != clazz2) {
this.superType = Sys.getType(clazz);
}
}
this.haveSuperType = true;
}
return this.superType;
}
public final BTypeSpec getTypeSpec() {
if (this.typeSpec == null) {
this.typeSpec = BTypeSpec.make(this);
}
return (BTypeSpec)this.typeSpec;
}
public final String toString() {
return this.module.getModuleName() + ':' + this.typeName;
}
public Object getFields() {
return this.fields;
}
public void setFields(Object object) {
this.fields = object;
}
final void checkConcrete() {
if (this.isAbstract) {
throw new AbstractTypeException(this.toString());
}
}
static String getTypeName(String string) {
String string2 = string;
int n = string2.lastIndexOf(46);
if (n > 0 && (string2 = string2.substring(n + 1)).length() > 1 && string2.charAt(0) == 'B' && Character.isUpperCase(string2.charAt(1))) {
string2 = string2.substring(1, string2.length());
}
return string2;
}
static /* synthetic */ Class class(String string, boolean bl) {
try {
Class<?> clazz = Class.forName(string);
if (!bl) {
clazz = clazz.getComponentType();
}
return clazz;
}
catch (ClassNotFoundException classNotFoundException) {
throw new NoClassDefFoundError(classNotFoundException.getMessage());
}
}
NType(Introspector introspector) {
this.id = introspector.id;
this.module = introspector.module;
this.typeClass = introspector.cls;
this.typeName = introspector.typeName;
this.isAbstract = introspector.isAbstract;
this.isFinal = introspector.isFinal;
this.module.register(this.typeName, this);
}
NType(NType nType) {
this.id = nType.id;
this.module = nType.module;
this.typeClass = nType.typeClass;
this.typeName = nType.typeName;
this.isAbstract = nType.isAbstract;
this.isFinal = nType.isFinal;
}
}
@@ -0,0 +1,20 @@
/*
* Decompiled with CFR 0.152.
*/
package com.tridium.sys.schema;
import com.tridium.sys.schema.Introspector;
import com.tridium.sys.schema.ObjectType;
import javax.baja.sys.Type;
class ObjectIntrospector
extends Introspector {
Type introspect() throws Exception {
return new ObjectType(this);
}
ObjectIntrospector(int n, Class clazz) {
super(n, clazz);
}
}
@@ -0,0 +1,33 @@
/*
* Decompiled with CFR 0.152.
*/
package com.tridium.sys.schema;
import com.tridium.sys.schema.Introspector;
import com.tridium.sys.schema.NType;
import javax.baja.sys.BObject;
import javax.baja.sys.BajaRuntimeException;
public class ObjectType
extends NType {
public final BObject getInstance() {
try {
return (BObject)this.getTypeClass().newInstance();
}
catch (RuntimeException runtimeException) {
throw runtimeException;
}
catch (Throwable throwable) {
throw new BajaRuntimeException("Class.newInstance() failed (insure public ctor and not abstract): " + this, throwable);
}
}
public boolean isInterface() {
return false;
}
ObjectType(Introspector introspector) {
super(introspector);
}
}
@@ -0,0 +1,198 @@
/*
* Decompiled with CFR 0.152.
*/
package com.tridium.sys.schema;
import com.tridium.sys.schema.DynamicTable;
import com.tridium.sys.schema.NProperty;
import javax.baja.log.Log;
import javax.baja.sys.Action;
import javax.baja.sys.BComplex;
import javax.baja.sys.BObject;
import javax.baja.sys.Context;
import javax.baja.sys.CursorException;
import javax.baja.sys.Property;
import javax.baja.sys.Slot;
import javax.baja.sys.SlotCursor;
import javax.baja.sys.Topic;
final class PropertyCursor
implements SlotCursor {
private static final Log log = Log.getLog("baja.PropertyCursor");
private int index = -1;
private BComplex object;
private NProperty[] frozen;
private DynamicTable dynamic;
private int count;
public final BObject target() {
return this.object;
}
public final Context getContext() {
return null;
}
public final boolean next() {
boolean bl = false;
if (++this.index < this.count) {
bl = true;
}
return bl;
}
public final boolean nextObject() {
while (++this.index < this.count) {
block4: {
try {
Property property = this.property();
if (property.getTypeAccess() != 7) {
}
break block4;
}
catch (RuntimeException runtimeException) {
if (!log.isTraceOn()) continue;
log.trace(runtimeException.getMessage(), runtimeException);
}
continue;
}
return true;
}
return false;
}
public final boolean nextComponent() {
while (++this.index < this.count) {
block4: {
try {
Property property = this.property();
if (property.getTypeAccess() != 7) continue;
if (!this.object.get(property).isComponent()) {
}
break block4;
}
catch (RuntimeException runtimeException) {
if (!log.isTraceOn()) continue;
log.trace(runtimeException.getMessage(), runtimeException);
}
continue;
}
return true;
}
return false;
}
public final boolean next(Class clazz) {
while (++this.index < this.count) {
block4: {
try {
Property property = this.property();
if (property.getTypeAccess() != 7) continue;
if (!clazz.isInstance(this.object.get(property))) {
}
break block4;
}
catch (RuntimeException runtimeException) {
runtimeException.printStackTrace();
}
continue;
}
return true;
}
return false;
}
public final Slot slot() {
if (this.index < this.frozen.length) {
return this.frozen[this.index];
}
return this.dynamic.slots[this.index - this.frozen.length];
}
public final Property property() {
if (this.index < this.frozen.length) {
return this.frozen[this.index];
}
return this.dynamic.slots[this.index - this.frozen.length];
}
public final int getTypeAccess() {
if (this.index < this.frozen.length) {
return this.frozen[this.index].typeAccess;
}
return this.dynamic.slots[this.index - this.frozen.length].typeAccess;
}
public final BObject get() {
if (this.index < this.frozen.length) {
return this.object.get(this.frozen[this.index]);
}
return this.object.get(this.dynamic.slots[this.index - this.frozen.length]);
}
public final boolean getBoolean() {
if (this.index < this.frozen.length) {
return this.object.getBoolean(this.frozen[this.index]);
}
return this.object.getBoolean(this.dynamic.slots[this.index - this.frozen.length]);
}
public final int getInt() {
if (this.index < this.frozen.length) {
return this.object.getInt(this.frozen[this.index]);
}
return this.object.getInt(this.dynamic.slots[this.index - this.frozen.length]);
}
public final long getLong() {
if (this.index < this.frozen.length) {
return this.object.getLong(this.frozen[this.index]);
}
return this.object.getLong(this.dynamic.slots[this.index - this.frozen.length]);
}
public final float getFloat() {
if (this.index < this.frozen.length) {
return this.object.getFloat(this.frozen[this.index]);
}
return this.object.getFloat(this.dynamic.slots[this.index - this.frozen.length]);
}
public final double getDouble() {
if (this.index < this.frozen.length) {
return this.object.getDouble(this.frozen[this.index]);
}
return this.object.getDouble(this.dynamic.slots[this.index - this.frozen.length]);
}
public final String getString() {
if (this.index < this.frozen.length) {
return this.object.getString(this.frozen[this.index]);
}
return this.object.getString(this.dynamic.slots[this.index - this.frozen.length]);
}
public final Action action() {
Slot slot = this.slot();
if (slot.isAction()) {
return slot.asAction();
}
throw new CursorException("not action");
}
public final Topic topic() {
Slot slot = this.slot();
if (slot.isTopic()) {
return slot.asTopic();
}
throw new CursorException("not topic");
}
PropertyCursor(BComplex bComplex, NProperty[] nPropertyArray, DynamicTable dynamicTable) {
this.object = bComplex;
this.frozen = nPropertyArray;
this.dynamic = dynamicTable;
this.count = dynamicTable == null ? nPropertyArray.length : nPropertyArray.length + dynamicTable.count;
}
}
@@ -0,0 +1,374 @@
/*
* Decompiled with CFR 0.152.
*/
package com.tridium.sys.schema;
import com.tridium.sys.Nre;
import com.tridium.sys.schema.Introspector;
import com.tridium.sys.schema.SimpleType;
import com.tridium.util.EscUtil;
import java.lang.ref.WeakReference;
import java.util.Hashtable;
import java.util.WeakHashMap;
import javax.baja.log.Log;
import javax.baja.spy.Spy;
import javax.baja.spy.SpyDir;
import javax.baja.spy.SpyWriter;
import javax.baja.sys.BValue;
import javax.baja.sys.Sys;
import javax.baja.sys.Type;
import javax.baja.sys.TypeIntrospectionException;
import javax.baja.sys.TypeNotFoundException;
import javax.baja.util.BTypeSpec;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class SchemaManager {
static Log log = Log.getLog("sys.schema");
Type booleanType;
Type integerType;
Type longType;
Type floatType;
Type doubleType;
Type stringType;
private int nextId;
private Type[] types;
private Hashtable byClass;
private boolean verbose;
static /* synthetic */ Class class$java$lang$String;
public synchronized Type getType(int n) {
Type type = null;
try {
type = this.types[n];
}
catch (ArrayIndexOutOfBoundsException arrayIndexOutOfBoundsException) {}
if (type == null) {
throw new TypeNotFoundException(String.valueOf(n));
}
return type;
}
public synchronized Type getType(Class clazz) {
Type type = (Type)this.byClass.get(clazz);
if (type != null) {
return type;
}
if (clazz == Boolean.TYPE) {
return this.getBooleanType();
}
if (clazz == Integer.TYPE) {
return this.getIntegerType();
}
if (clazz == Long.TYPE) {
return this.getLongType();
}
if (clazz == Float.TYPE) {
return this.getFloatType();
}
if (clazz == Double.TYPE) {
return this.getDoubleType();
}
Class clazz2 = class$java$lang$String;
if (clazz2 == null) {
clazz2 = class$java$lang$String = SchemaManager.class("[Ljava.lang.String;", false);
}
if (clazz == clazz2) {
return this.getStringType();
}
try {
clazz.newInstance();
}
catch (Throwable throwable) {}
type = (Type)this.byClass.get(clazz);
if (type != null) {
return type;
}
try {
clazz.getField("TYPE").get(null);
}
catch (Throwable throwable) {}
type = (Type)this.byClass.get(clazz);
if (type != null) {
return type;
}
throw new TypeNotFoundException(clazz.getName());
}
public synchronized Type[] getTypes() {
Type[] typeArray = new Type[this.nextId];
System.arraycopy(this.types, 0, typeArray, 0, typeArray.length);
return typeArray;
}
public synchronized Type load(Class clazz) {
int n = -1;
n = this.nextId++;
Type type = this.load(n, clazz);
if (n >= this.types.length) {
int n2 = Math.max(this.types.length * 2, n + 10);
Type[] typeArray = new Type[n2];
System.arraycopy(this.types, 0, typeArray, 0, this.types.length);
this.types = typeArray;
}
this.byClass.put(type.getTypeClass(), type);
this.types[n] = type;
return this.types[n];
}
/*
* Enabled aggressive block sorting
* Enabled unnecessary exception pruning
* Enabled aggressive exception aggregation
*/
private final Type load(int n, Class clazz) {
Type type;
long l = System.currentTimeMillis();
try {
try {
type = Introspector.create(n, clazz).introspect();
Object var6_5 = null;
if (!this.verbose) return type;
}
catch (TypeIntrospectionException typeIntrospectionException) {
log.error("Cannot load type for \"" + clazz.getName() + '\"');
throw typeIntrospectionException;
}
catch (Throwable throwable) {
throwable.printStackTrace();
log.error("ERROR: Cannot load type for \"" + clazz.getName() + '\"', throwable);
throw new TypeIntrospectionException(clazz, throwable.toString());
}
}
catch (Throwable throwable) {
Object var6_6 = null;
if (!this.verbose) throw throwable;
long l2 = System.currentTimeMillis();
log.trace("Loaded \"" + clazz.getName() + "\" [" + (l2 - l) + "ms]");
throw throwable;
}
long l3 = System.currentTimeMillis();
log.trace("Loaded \"" + clazz.getName() + "\" [" + (l3 - l) + "ms]");
return type;
}
public void postInit() {
Nre.spySysManagers.add("schemaManager", new Page());
}
final Type getBooleanType() {
if (this.booleanType == null) {
this.booleanType = Sys.getType("baja:Boolean");
}
return this.booleanType;
}
final Type getIntegerType() {
if (this.integerType == null) {
this.integerType = Sys.getType("baja:Integer");
}
return this.integerType;
}
final Type getLongType() {
if (this.longType == null) {
this.longType = Sys.getType("baja:Long");
}
return this.longType;
}
final Type getFloatType() {
if (this.floatType == null) {
this.floatType = Sys.getType("baja:Float");
}
return this.floatType;
}
final Type getDoubleType() {
if (this.doubleType == null) {
this.doubleType = Sys.getType("baja:Double");
}
return this.doubleType;
}
final Type getStringType() {
if (this.stringType == null) {
this.stringType = Sys.getType("baja:String");
}
return this.stringType;
}
static /* synthetic */ Class class(String string, boolean bl) {
try {
Class<?> clazz = Class.forName(string);
if (!bl) {
clazz = clazz.getComponentType();
}
return clazz;
}
catch (ClassNotFoundException classNotFoundException) {
throw new NoClassDefFoundError(classNotFoundException.getMessage());
}
}
private final /* synthetic */ void this() {
this.nextId = 0;
this.types = new Type[256];
this.byClass = new Hashtable();
this.verbose = true;
}
public SchemaManager() {
this.this();
}
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class Page
extends SpyDir {
public Spy find(String string) {
return new CachePage(BTypeSpec.make(EscUtil.slot.unescape(string)));
}
public void write(SpyWriter spyWriter) throws Exception {
spyWriter.startTable(true);
String string = "Loaded Types";
if (SimpleType.internDebug) {
string = string + " (Max Intern Ticks = " + SimpleType.maxInternTicks + ')';
if (SimpleType.maxCacheSize != Integer.MAX_VALUE) {
string = string + " - Intern Max Cache Size = " + SimpleType.maxCacheSize;
}
}
spyWriter.trTitle(string, 4);
int n = 0;
while (n < SchemaManager.this.types.length) {
Type type = SchemaManager.this.types[n];
if (SchemaManager.this.types[n] != null) {
WeakHashMap weakHashMap = null;
if (type instanceof SimpleType) {
weakHashMap = ((SimpleType)type).internMap;
}
spyWriter.tr("" + type.getId(), type.getModule().getModuleName(), type.getTypeName(), this.hyperlink(spyWriter, type, weakHashMap));
}
++n;
}
spyWriter.endTable();
}
String hyperlink(SpyWriter spyWriter, Type type, WeakHashMap weakHashMap) {
if (weakHashMap != null && weakHashMap.size() > 0) {
String string = "Intern Size = " + weakHashMap.size() + " (Reuse count = " + ((SimpleType)type).reuseCounter + ')';
BTypeSpec bTypeSpec = type.getTypeSpec();
try {
return "<a href='" + spyWriter.href(EscUtil.slot.escape(bTypeSpec.encodeToString())) + "'>" + string + "</a>";
}
catch (Exception exception) {
exception.printStackTrace();
}
} else if (type instanceof SimpleType && !((SimpleType)type).interningEnabled()) {
return "Interning disabled";
}
return "";
}
}
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
class CachePage
extends SpyDir {
BTypeSpec typeSpec;
/*
* WARNING - Removed try catching itself - possible behaviour change.
* Enabled aggressive block sorting
* Enabled unnecessary exception pruning
* Enabled aggressive exception aggregation
*/
public Spy find(String string) {
Type type;
if (!string.equals("clear") || !((type = this.typeSpec.getResolvedType()) instanceof SimpleType)) return this;
WeakHashMap weakHashMap = ((SimpleType)type).internMap;
synchronized (weakHashMap) {
((SimpleType)type).internMap.clear();
((SimpleType)type).reuseCounter = 0L;
return this;
}
}
/*
* WARNING - Removed try catching itself - possible behaviour change.
* Unable to fully structure code
* Enabled aggressive block sorting
* Enabled unnecessary exception pruning
* Enabled aggressive exception aggregation
*/
public void write(SpyWriter var1_1) throws Exception {
block14: {
var2_2 = 0;
var3_3 = null;
var4_4 = this.typeSpec.getResolvedType();
if (var4_4 instanceof SimpleType) {
var3_3 = ((SimpleType)var4_4).internMap;
}
if (var3_3 != null) {
var2_2 = var3_3.size();
}
var1_1.startTable(true);
var5_5 = SimpleType.internDebug;
var6_6 = var5_5 + 1;
var7_7 = var2_2 + " Interned Instances of " + this.typeSpec + " (Reuse count = " + ((SimpleType)var4_4).reuseCounter + ')';
if (var2_2 > 0) {
var7_7 = var7_7 + "<a href='" + var1_1.href("clear") + "'> Clear Intern Cache</a>";
}
var1_1.trTitle(var7_7, var6_6);
if (var5_5 != 0) {
var1_1.w("<tr><th>Reuse Count</th><th>toString()</th></tr>\n");
} else {
var1_1.w("<tr><th>toString()</th></tr>\n");
}
if (var3_3 == null) break block14;
var8_8 = null;
var9_9 = var3_3;
synchronized (var9_9) {
var8_8 = var3_3.values().toArray();
// MONITOREXIT @DISABLED, blocks:[0, 1] lbl29 : MonitorExitStatement: MONITOREXIT : var9_9
if (var8_8 == null) break block14;
var11_10 = 0;
if (true) ** GOTO lbl52
}
do {
var12_11 = (WeakReference)var8_8[var11_10];
var13_12 = null;
if (var12_11 != null) {
var13_12 = (BValue)var12_11.get();
}
if (var13_12 != null) {
if (var5_5 != 0) {
var14_13 = (Integer)((SimpleType)var4_4).counterMap.get(var13_12);
var15_14 = "0";
if (var14_13 != null) {
var15_14 = "" + var14_13;
}
var1_1.tr(var15_14, var13_12.toString());
} else {
var1_1.tr(var13_12.toString());
}
}
++var11_10;
lbl52:
// 2 sources
} while (var11_10 < var8_8.length);
}
var1_1.endTable();
}
CachePage(BTypeSpec bTypeSpec) {
this.typeSpec = bTypeSpec;
}
}
}
@@ -0,0 +1,51 @@
/*
* Decompiled with CFR 0.152.
*/
package com.tridium.sys.schema;
import com.tridium.sys.schema.Introspector;
import com.tridium.sys.schema.SimpleType;
import java.lang.reflect.Modifier;
import java.util.HashMap;
import javax.baja.sys.BSimple;
import javax.baja.sys.Type;
class SimpleIntrospector
extends Introspector {
static HashMap dataTypes = new HashMap();
Type introspect() throws Exception {
if (!this.isAbstract && !Modifier.isFinal(this.cls.getModifiers())) {
throw this.err("Concrete BSimples must be declared final");
}
return new SimpleType(this, (BSimple)this.getConstantFieldObject("DEFAULT"), SimpleIntrospector.getDataTypeSymbol(this.cls));
}
static char getDataTypeSymbol(Class clazz) {
Character c = (Character)dataTypes.get(clazz.getName());
if (c == null) {
return '\u0000';
}
return c.charValue();
}
SimpleIntrospector(int n, Class clazz) {
super(n, clazz);
}
static {
dataTypes.put("javax.baja.sys.BBoolean", new Character('b'));
dataTypes.put("javax.baja.sys.BInteger", new Character('i'));
dataTypes.put("javax.baja.sys.BLong", new Character('l'));
dataTypes.put("javax.baja.sys.BFloat", new Character('f'));
dataTypes.put("javax.baja.sys.BDouble", new Character('d'));
dataTypes.put("javax.baja.sys.BString", new Character('s'));
dataTypes.put("javax.baja.sys.BDynamicEnum", new Character('e'));
dataTypes.put("javax.baja.sys.BEnumRange", new Character('E'));
dataTypes.put("javax.baja.sys.BAbsTime", new Character('a'));
dataTypes.put("javax.baja.sys.BRelTime", new Character('r'));
dataTypes.put("javax.baja.timezone.BTimeZone", new Character('z'));
dataTypes.put("javax.baja.units.BUnit", new Character('u'));
}
}
@@ -0,0 +1,156 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* javax.baja.nre.util.Array
*/
package com.tridium.sys.schema;
import com.tridium.sys.schema.Introspector;
import com.tridium.sys.schema.NType;
import java.lang.ref.WeakReference;
import java.util.StringTokenizer;
import java.util.WeakHashMap;
import javax.baja.nre.util.Array;
import javax.baja.sys.BObject;
import javax.baja.sys.BSimple;
import javax.baja.sys.Clock;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class SimpleType
extends NType {
static final boolean internDisabled;
static final int maxCacheSize;
static final String defaultExcludedTypes = "baja:AbsTime;baja:Double;baja:Float;baja:Integer;baja:Long;baja:Ord;baja:OrdList;baja:Uuid";
static final Array noInternTypes;
static final boolean internDebug;
static volatile long maxInternTicks;
BSimple defaultInstance;
final char dataTypeSymbol;
final WeakHashMap internMap;
long reuseCounter;
final WeakHashMap counterMap;
static /* synthetic */ Class class$java$lang$String;
/*
* WARNING - Removed try catching itself - possible behaviour change.
* Enabled aggressive block sorting
* Enabled unnecessary exception pruning
* Enabled aggressive exception aggregation
*/
public final BSimple intern(BSimple bSimple) {
block10: {
long l;
if (this.internMap == null) {
return bSimple;
}
long l2 = l = internDebug ? Clock.ticks() : 0L;
if (bSimple.fw(116, bSimple, null, null, null) == Boolean.TRUE) {
return bSimple;
}
WeakHashMap weakHashMap = this.internMap;
synchronized (weakHashMap) {
BSimple bSimple2;
WeakReference weakReference = (WeakReference)this.internMap.get(bSimple);
if (weakReference != null && (bSimple2 = (BSimple)weakReference.get()) != null) {
++this.reuseCounter;
if (internDebug) {
Integer n = (Integer)this.counterMap.get(bSimple2);
if (n != null) {
this.counterMap.put(bSimple2, new Integer(n + 1));
} else {
this.counterMap.put(bSimple2, new Integer(1));
}
maxInternTicks = Math.max(maxInternTicks, Clock.ticks() - l);
}
return bSimple2;
}
if (this.internMap.size() < maxCacheSize) {
this.internMap.put(bSimple, new WeakReference<BSimple>(bSimple));
}
// MONITOREXIT @DISABLED, blocks:[0, 1] lbl26 : MonitorExitStatement: MONITOREXIT : var4_3
if (!internDebug) break block10;
}
maxInternTicks = Math.max(maxInternTicks, Clock.ticks() - l);
}
return bSimple;
}
public final boolean interningEnabled() {
boolean bl = false;
if (this.internMap != null) {
bl = true;
}
return bl;
}
public final BObject getInstance() {
this.checkConcrete();
return this.defaultInstance;
}
public final boolean isDataType() {
boolean bl = false;
if (this.dataTypeSymbol != '\u0000') {
bl = true;
}
return bl;
}
public final char getDataTypeSymbol() {
return this.dataTypeSymbol;
}
static /* synthetic */ Class class(String string, boolean bl) {
try {
Class<?> clazz = Class.forName(string);
if (!bl) {
clazz = clazz.getComponentType();
}
return clazz;
}
catch (ClassNotFoundException classNotFoundException) {
throw new NoClassDefFoundError(classNotFoundException.getMessage());
}
}
private final /* synthetic */ void this() {
this.reuseCounter = 0L;
this.counterMap = internDebug ? new WeakHashMap() : null;
}
SimpleType(Introspector introspector, BSimple bSimple, char c) {
super(introspector);
this.this();
this.defaultInstance = bSimple;
this.dataTypeSymbol = c;
this.internMap = internDisabled || noInternTypes.contains((Object)this.toString()) ? null : new WeakHashMap();
}
static {
String string;
internDisabled = Boolean.getBoolean("niagara.intern.disabled");
maxCacheSize = Integer.getInteger("niagara.intern.maxCacheSize", Integer.MAX_VALUE);
Class clazz = class$java$lang$String;
if (clazz == null) {
clazz = class$java$lang$String = SimpleType.class("[Ljava.lang.String;", false);
}
noInternTypes = new Array(clazz);
if (!internDisabled && (string = System.getProperty("niagara.intern.excludeTypes", defaultExcludedTypes)) != null) {
StringTokenizer stringTokenizer = new StringTokenizer(string, ";");
while (stringTokenizer.hasMoreTokens()) {
try {
noInternTypes.add((Object)stringTokenizer.nextToken());
}
catch (Exception exception) {
exception.printStackTrace();
}
}
}
internDebug = Boolean.getBoolean("niagara.intern.debug");
maxInternTicks = 0L;
}
}
@@ -0,0 +1,21 @@
/*
* Decompiled with CFR 0.152.
*/
package com.tridium.sys.schema;
import com.tridium.sys.schema.Introspector;
import com.tridium.sys.schema.SingletonType;
import javax.baja.sys.BSingleton;
import javax.baja.sys.Type;
class SingletonIntrospector
extends Introspector {
Type introspect() throws Exception {
return new SingletonType(this, (BSingleton)this.getConstantFieldObject("INSTANCE"));
}
SingletonIntrospector(int n, Class clazz) {
super(n, clazz);
}
}
@@ -0,0 +1,25 @@
/*
* Decompiled with CFR 0.152.
*/
package com.tridium.sys.schema;
import com.tridium.sys.schema.NType;
import com.tridium.sys.schema.SingletonIntrospector;
import javax.baja.sys.BObject;
import javax.baja.sys.BSingleton;
public class SingletonType
extends NType {
final BSingleton instance;
public final BObject getInstance() {
this.checkConcrete();
return this.instance;
}
SingletonType(SingletonIntrospector singletonIntrospector, BSingleton bSingleton) {
super(singletonIntrospector);
this.instance = bSingleton;
}
}
@@ -0,0 +1,161 @@
/*
* Decompiled with CFR 0.152.
*/
package com.tridium.sys.schema;
import com.tridium.sys.schema.DynamicTable;
import com.tridium.sys.schema.NSlot;
import javax.baja.sys.Action;
import javax.baja.sys.BComplex;
import javax.baja.sys.BObject;
import javax.baja.sys.Context;
import javax.baja.sys.Property;
import javax.baja.sys.Slot;
import javax.baja.sys.SlotCursor;
import javax.baja.sys.Topic;
final class SlotsCursor
implements SlotCursor {
private int index = -1;
private BComplex object;
private NSlot[] frozen;
private DynamicTable dynamic;
private int count;
public final BObject target() {
return this.object;
}
public final Context getContext() {
return null;
}
public final boolean next() {
boolean bl = false;
if (++this.index < this.count) {
bl = true;
}
return bl;
}
public final boolean nextObject() {
while (++this.index < this.count) {
block4: {
try {
Slot slot = this.slot();
if (!slot.isProperty()) continue;
if (slot.asProperty().getTypeAccess() != 7) {
}
break block4;
}
catch (RuntimeException runtimeException) {
runtimeException.printStackTrace();
}
continue;
}
return true;
}
return false;
}
public final boolean nextComponent() {
while (++this.index < this.count) {
block4: {
try {
Property property;
Slot slot = this.slot();
if (!slot.isProperty() || (property = slot.asProperty()).getTypeAccess() != 7) continue;
if (!this.object.get(property).isComponent()) {
}
break block4;
}
catch (RuntimeException runtimeException) {
runtimeException.printStackTrace();
}
continue;
}
return true;
}
return false;
}
public final boolean next(Class clazz) {
while (++this.index < this.count) {
block4: {
try {
Property property;
Slot slot = this.slot();
if (!slot.isProperty() || (property = slot.asProperty()).getTypeAccess() != 7) continue;
if (!clazz.isInstance(this.object.get(property))) {
}
break block4;
}
catch (RuntimeException runtimeException) {
runtimeException.printStackTrace();
}
continue;
}
return true;
}
return false;
}
public final Slot slot() {
if (this.index < this.frozen.length) {
return this.frozen[this.index];
}
return this.dynamic.slots[this.index - this.frozen.length];
}
public final Property property() {
return this.slot().asProperty();
}
public final int getTypeAccess() {
return this.slot().asProperty().getTypeAccess();
}
public final BObject get() {
return this.object.get(this.slot().asProperty());
}
public final boolean getBoolean() {
return this.object.getBoolean(this.slot().asProperty());
}
public final int getInt() {
return this.object.getInt(this.slot().asProperty());
}
public final long getLong() {
return this.object.getLong(this.slot().asProperty());
}
public final float getFloat() {
return this.object.getFloat(this.slot().asProperty());
}
public final double getDouble() {
return this.object.getDouble(this.slot().asProperty());
}
public final String getString() {
return this.object.getString(this.slot().asProperty());
}
public final Action action() {
return this.slot().asAction();
}
public final Topic topic() {
return this.slot().asTopic();
}
SlotsCursor(BComplex bComplex, NSlot[] nSlotArray, DynamicTable dynamicTable) {
this.object = bComplex;
this.frozen = nSlotArray;
this.dynamic = dynamicTable;
this.count = dynamicTable == null ? nSlotArray.length : nSlotArray.length + dynamicTable.count;
}
}
@@ -0,0 +1,851 @@
/*
* Decompiled with CFR 0.152.
*/
package com.tridium.sys.schema;
import com.tridium.asm.Assembler;
import com.tridium.asm.AttributeInfo;
import com.tridium.asm.Buffer;
import com.tridium.asm.Code;
import com.tridium.asm.ConstantPool;
import com.tridium.asm.FieldInfo;
import com.tridium.asm.Jvm;
import com.tridium.asm.MethodInfo;
import javax.baja.registry.TypeInfo;
import javax.baja.sys.BComplex;
import javax.baja.sys.BComponent;
import javax.baja.sys.BFrozenEnum;
import javax.baja.sys.BIService;
import javax.baja.sys.BSimple;
import javax.baja.util.BTypeSpec;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class SyntheticCompiler {
public static final BComponent COMPONENT = new BComponent();
static /* synthetic */ Class class$javax$baja$sys$Type;
static /* synthetic */ Class class$java$lang$Class;
static /* synthetic */ Class class$java$lang$String;
static /* synthetic */ Class class$javax$baja$sys$Sys;
static /* synthetic */ Class class$javax$baja$sys$BIcon;
static /* synthetic */ Class class$javax$baja$naming$BOrdList;
static /* synthetic */ Class class$javax$baja$naming$BOrd;
static /* synthetic */ Class class$com$tridium$sys$schema$SyntheticCompiler;
static /* synthetic */ Class class$javax$baja$sys$BComponent;
static /* synthetic */ Class class$javax$baja$sys$Context;
static /* synthetic */ Class class$javax$baja$agent$AgentList;
static /* synthetic */ Class class$javax$baja$registry$Registry;
static /* synthetic */ Class class$javax$baja$sys$BComplex;
static /* synthetic */ Class class$javax$baja$registry$TypeInfo;
static /* synthetic */ Class class$javax$baja$sys$BFrozenEnum;
static /* synthetic */ Class class$javax$baja$sys$BSimple;
static /* synthetic */ Class array$Ljavax$baja$sys$Type;
static /* synthetic */ Class class$java$lang$Object;
static /* synthetic */ Class array$B;
static /* synthetic */ Class class$java$io$DataOutput;
static /* synthetic */ Class class$javax$baja$io$ByteBuffer;
static /* synthetic */ Class class$java$io$DataInput;
static /* synthetic */ Class class$javax$baja$sys$BObject;
public static Buffer compile(BTypeSpec bTypeSpec, TypeInfo typeInfo, TypeInfo[] typeInfoArray, boolean bl, boolean bl2, boolean bl3) {
if (bTypeSpec == null) {
throw new IllegalArgumentException("Synthetic TypeSpec is null.");
}
return SyntheticCompiler.compile(bTypeSpec.getTypeInfo().getTypeClassName(), typeInfo, typeInfoArray, bl, bl2, bl3, null);
}
public static Buffer compile(String string, TypeInfo typeInfo, TypeInfo[] typeInfoArray, boolean bl, boolean bl2, boolean bl3, byte[] byArray) {
Class clazz;
Class clazz2;
Class clazz3;
int n;
String string2 = string.replace('.', '/');
if (typeInfo == null) {
throw new IllegalArgumentException("Superclass is null.");
}
if (typeInfo.isFinal()) {
throw new IllegalArgumentException("Superclass is final: " + typeInfo.getTypeName());
}
if (typeInfo.isInterface()) {
throw new IllegalArgumentException("Superclass is an interface: " + typeInfo.getTypeName());
}
String string3 = typeInfo.getTypeClassName().replace('.', '/');
String[] stringArray = null;
if (typeInfoArray != null && typeInfoArray.length != 0) {
stringArray = new String[typeInfoArray.length];
n = 0;
while (n < typeInfoArray.length) {
if (!typeInfoArray[n].isInterface()) {
throw new IllegalArgumentException("Class is not an interface: " + typeInfoArray[n].getTypeName());
}
stringArray[n] = typeInfoArray[n].getTypeClassName().replace('.', '/');
++n;
}
}
if (bl && bl2) {
throw new IllegalArgumentException("Illegal to declare class both final and abstract.");
}
n = 1;
if (bl) {
n |= 0x400;
}
if (bl2) {
n |= 0x10;
}
Assembler assembler = new Assembler(string2, string3, n, stringArray);
assembler.addAttribute(new AttributeInfo(assembler, "SourceFile", "AutoGenerated"));
assembler.addAttribute(new AttributeInfo(assembler, "Synthetic", new byte[0]));
Class clazz4 = class$javax$baja$sys$Type;
if (clazz4 == null) {
clazz4 = class$javax$baja$sys$Type = SyntheticCompiler.class("[Ljavax.baja.sys.Type;", false);
}
FieldInfo fieldInfo = new FieldInfo(assembler, "TYPE", Jvm.fieldDescriptor(clazz4), 25);
assembler.addField(fieldInfo);
Class clazz5 = class$java$lang$Class;
if (clazz5 == null) {
clazz5 = class$java$lang$Class = SyntheticCompiler.class("[Ljava.lang.Class;", false);
}
FieldInfo fieldInfo2 = new FieldInfo(assembler, "INTROSPECTOR", Jvm.fieldDescriptor(clazz5), 25);
assembler.addField(fieldInfo2);
FieldInfo fieldInfo3 = null;
FieldInfo fieldInfo4 = null;
if (typeInfo.is(BSimple.TYPE) && !typeInfo.is(BFrozenEnum.TYPE) && !bl) {
Class clazz6 = class$java$lang$String;
if (clazz6 == null) {
clazz6 = class$java$lang$String = SyntheticCompiler.class("[Ljava.lang.String;", false);
}
fieldInfo3 = new FieldInfo(assembler, "value", Jvm.fieldDescriptor(clazz6), 18);
assembler.addField(fieldInfo3);
if (byArray == null) {
throw new IllegalArgumentException("Default must be specified for simple types.");
}
fieldInfo4 = new FieldInfo(assembler, "DEFAULT", "L" + string2 + ';', 25);
assembler.addField(fieldInfo4);
}
Object object = new Code(assembler);
if (typeInfo.is(BComplex.TYPE)) {
((Code)object).add(18, assembler.cp.string("com.tridium.sys.schema.SyntheticComplexIntrospector"));
} else if (typeInfo.is(BFrozenEnum.TYPE)) {
((Code)object).add(18, assembler.cp.string("com.tridium.sys.schema.SyntheticEnumIntrospector"));
} else if (typeInfo.is(BSimple.TYPE)) {
((Code)object).add(18, assembler.cp.string("com.tridium.sys.schema.SyntheticSimpleIntrospector"));
typeInfo = BSimple.TYPE.getTypeInfo();
} else {
throw new IllegalArgumentException("Specified super class '" + typeInfo + "' can not be used to create a synthetic type.");
}
ConstantPool constantPool = assembler.cp;
ConstantPool constantPool2 = assembler.cp;
Class clazz7 = class$java$lang$Class;
if (clazz7 == null) {
clazz7 = class$java$lang$Class = SyntheticCompiler.class("[Ljava.lang.Class;", false);
}
int n2 = constantPool2.cls(clazz7);
Class[] classArray = new Class[1];
Class clazz8 = class$java$lang$String;
if (clazz8 == null) {
clazz8 = classArray[0] = (class$java$lang$String = SyntheticCompiler.class("[Ljava.lang.String;", false));
}
if ((clazz3 = class$java$lang$Class) == null) {
clazz3 = class$java$lang$Class = SyntheticCompiler.class("[Ljava.lang.Class;", false);
}
((Code)object).add(184, constantPool.method(n2, "forName", Jvm.methodDescriptor(classArray, clazz3)));
((Code)object).add(179, assembler.cp.field(fieldInfo2));
if (fieldInfo4 != null) {
((Code)object).add(187, assembler.thisClass);
((Code)object).add(89);
((Code)object).add(18, assembler.cp.string(new String(byArray)));
ConstantPool constantPool3 = ((Code)object).cp;
int n3 = assembler.thisClass;
int n4 = assembler.cp.utf("<init>");
Class[] classArray2 = new Class[1];
Class clazz9 = class$java$lang$String;
if (clazz9 == null) {
clazz9 = class$java$lang$String = SyntheticCompiler.class("[Ljava.lang.String;", false);
}
classArray2[0] = clazz9;
((Code)object).add(183, constantPool3.method(n3, n4, Jvm.methodDescriptor(classArray2, Void.TYPE)));
((Code)object).add(179, assembler.cp.field(fieldInfo4));
}
((Code)object).add(18, assembler.cp.string(string));
ConstantPool constantPool4 = assembler.cp;
ConstantPool constantPool5 = assembler.cp;
Class clazz10 = class$java$lang$Class;
if (clazz10 == null) {
clazz10 = class$java$lang$Class = SyntheticCompiler.class("[Ljava.lang.Class;", false);
}
int n5 = constantPool5.cls(clazz10);
Class[] classArray3 = new Class[1];
Class clazz11 = class$java$lang$String;
if (clazz11 == null) {
clazz11 = classArray3[0] = (class$java$lang$String = SyntheticCompiler.class("[Ljava.lang.String;", false));
}
if ((clazz2 = class$java$lang$Class) == null) {
clazz2 = class$java$lang$Class = SyntheticCompiler.class("[Ljava.lang.Class;", false);
}
((Code)object).add(184, constantPool4.method(n5, "forName", Jvm.methodDescriptor(classArray3, clazz2)));
ConstantPool constantPool6 = assembler.cp;
ConstantPool constantPool7 = assembler.cp;
Class clazz12 = class$javax$baja$sys$Sys;
if (clazz12 == null) {
clazz12 = class$javax$baja$sys$Sys = SyntheticCompiler.class("[Ljavax.baja.sys.Sys;", false);
}
int n6 = constantPool7.cls(clazz12);
ConstantPool constantPool8 = assembler.cp;
Class[] classArray4 = new Class[1];
Class clazz13 = class$java$lang$Class;
if (clazz13 == null) {
clazz13 = classArray4[0] = (class$java$lang$Class = SyntheticCompiler.class("[Ljava.lang.Class;", false));
}
if ((clazz = class$javax$baja$sys$Type) == null) {
clazz = class$javax$baja$sys$Type = SyntheticCompiler.class("[Ljavax.baja.sys.Type;", false);
}
((Code)object).add(184, constantPool6.method(n6, constantPool8.nt("loadType", Jvm.methodDescriptor(classArray4, clazz))));
((Code)object).add(179, assembler.cp.field(fieldInfo));
((Code)object).add(177);
assembler.addMethod(new MethodInfo(assembler, assembler.cp.utf("<clinit>"), Jvm.methodDescriptor(new Class[0], Void.TYPE), 1, (Code)object));
object = new Code(assembler);
((Code)object).add(42);
((Code)object).add(178, assembler.cp.field(fieldInfo));
((Code)object).add(176);
Class[] classArray5 = new Class[]{};
Class clazz14 = class$javax$baja$sys$Type;
if (clazz14 == null) {
clazz14 = class$javax$baja$sys$Type = SyntheticCompiler.class("[Ljavax.baja.sys.Type;", false);
}
assembler.addMethod(new MethodInfo(assembler, "getType", Jvm.methodDescriptor(classArray5, clazz14), 1, (Code)object));
if (bl3) {
Class clazz15;
Class clazz16;
Class clazz17;
Class clazz18;
Class clazz19;
object = new Code(assembler);
((Code)object).add(42);
ConstantPool constantPool9 = ((Code)object).cp;
int n7 = assembler.superClass;
int n8 = assembler.cp.utf("getIcon");
Class[] classArray6 = new Class[]{};
Class clazz20 = class$javax$baja$sys$BIcon;
if (clazz20 == null) {
clazz20 = class$javax$baja$sys$BIcon = SyntheticCompiler.class("[Ljavax.baja.sys.BIcon;", false);
}
((Code)object).add(183, constantPool9.method(n7, n8, Jvm.methodDescriptor(classArray6, clazz20)));
ConstantPool constantPool10 = ((Code)object).cp;
ConstantPool constantPool11 = assembler.cp;
Class clazz21 = class$javax$baja$sys$BIcon;
if (clazz21 == null) {
clazz21 = class$javax$baja$sys$BIcon = SyntheticCompiler.class("[Ljavax.baja.sys.BIcon;", false);
}
int n9 = constantPool11.cls(clazz21);
int n10 = assembler.cp.utf("getOrdList");
Class[] classArray7 = new Class[]{};
Class clazz22 = class$javax$baja$naming$BOrdList;
if (clazz22 == null) {
clazz22 = class$javax$baja$naming$BOrdList = SyntheticCompiler.class("[Ljavax.baja.naming.BOrdList;", false);
}
((Code)object).add(182, constantPool10.method(n9, n10, Jvm.methodDescriptor(classArray7, clazz22)));
((Code)object).add(18, assembler.cp.string("module://icons/x16/badges/beaker.png"));
ConstantPool constantPool12 = ((Code)object).cp;
ConstantPool constantPool13 = assembler.cp;
Class clazz23 = class$javax$baja$naming$BOrd;
if (clazz23 == null) {
clazz23 = class$javax$baja$naming$BOrd = SyntheticCompiler.class("[Ljavax.baja.naming.BOrd;", false);
}
int n11 = constantPool13.cls(clazz23);
int n12 = assembler.cp.utf("make");
Class[] classArray8 = new Class[1];
Class clazz24 = class$java$lang$String;
if (clazz24 == null) {
clazz24 = classArray8[0] = (class$java$lang$String = SyntheticCompiler.class("[Ljava.lang.String;", false));
}
if ((clazz19 = class$javax$baja$naming$BOrd) == null) {
clazz19 = class$javax$baja$naming$BOrd = SyntheticCompiler.class("[Ljavax.baja.naming.BOrd;", false);
}
((Code)object).add(184, constantPool12.method(n11, n12, Jvm.methodDescriptor(classArray8, clazz19)));
ConstantPool constantPool14 = ((Code)object).cp;
ConstantPool constantPool15 = assembler.cp;
Class clazz25 = class$javax$baja$naming$BOrdList;
if (clazz25 == null) {
clazz25 = class$javax$baja$naming$BOrdList = SyntheticCompiler.class("[Ljavax.baja.naming.BOrdList;", false);
}
int n13 = constantPool15.cls(clazz25);
int n14 = assembler.cp.utf("add");
Class[] classArray9 = new Class[2];
Class clazz26 = class$javax$baja$naming$BOrdList;
if (clazz26 == null) {
clazz26 = classArray9[0] = (class$javax$baja$naming$BOrdList = SyntheticCompiler.class("[Ljavax.baja.naming.BOrdList;", false));
}
if ((clazz18 = class$javax$baja$naming$BOrd) == null) {
clazz18 = classArray9[1] = (class$javax$baja$naming$BOrd = SyntheticCompiler.class("[Ljavax.baja.naming.BOrd;", false));
}
if ((clazz17 = class$javax$baja$naming$BOrdList) == null) {
clazz17 = class$javax$baja$naming$BOrdList = SyntheticCompiler.class("[Ljavax.baja.naming.BOrdList;", false);
}
((Code)object).add(184, constantPool14.method(n13, n14, Jvm.methodDescriptor(classArray9, clazz17)));
ConstantPool constantPool16 = ((Code)object).cp;
ConstantPool constantPool17 = assembler.cp;
Class clazz27 = class$javax$baja$sys$BIcon;
if (clazz27 == null) {
clazz27 = class$javax$baja$sys$BIcon = SyntheticCompiler.class("[Ljavax.baja.sys.BIcon;", false);
}
int n15 = constantPool17.cls(clazz27);
int n16 = assembler.cp.utf("make");
Class[] classArray10 = new Class[1];
Class clazz28 = class$javax$baja$naming$BOrdList;
if (clazz28 == null) {
clazz28 = classArray10[0] = (class$javax$baja$naming$BOrdList = SyntheticCompiler.class("[Ljavax.baja.naming.BOrdList;", false));
}
if ((clazz16 = class$javax$baja$sys$BIcon) == null) {
clazz16 = class$javax$baja$sys$BIcon = SyntheticCompiler.class("[Ljavax.baja.sys.BIcon;", false);
}
((Code)object).add(184, constantPool16.method(n15, n16, Jvm.methodDescriptor(classArray10, clazz16)));
((Code)object).add(176);
Class[] classArray11 = new Class[]{};
Class clazz29 = class$javax$baja$sys$BIcon;
if (clazz29 == null) {
clazz29 = class$javax$baja$sys$BIcon = SyntheticCompiler.class("[Ljavax.baja.sys.BIcon;", false);
}
assembler.addMethod(new MethodInfo(assembler, "getIcon", Jvm.methodDescriptor(classArray11, clazz29), 1, (Code)object));
object = new Code(assembler);
if (typeInfo.is(BComponent.TYPE)) {
Class clazz30;
ConstantPool constantPool18 = ((Code)object).cp;
ConstantPool constantPool19 = ((Code)object).cp;
Class clazz31 = class$com$tridium$sys$schema$SyntheticCompiler;
if (clazz31 == null) {
clazz31 = class$com$tridium$sys$schema$SyntheticCompiler = SyntheticCompiler.class("[Lcom.tridium.sys.schema.SyntheticCompiler;", false);
}
int n17 = constantPool19.cls(clazz31);
int n18 = ((Code)object).cp.utf("COMPONENT");
Class clazz32 = class$javax$baja$sys$BComponent;
if (clazz32 == null) {
clazz32 = class$javax$baja$sys$BComponent = SyntheticCompiler.class("[Ljavax.baja.sys.BComponent;", false);
}
((Code)object).add(178, constantPool18.field(n17, n18, Jvm.fieldDescriptor(clazz32)));
((Code)object).add(43);
ConstantPool constantPool20 = ((Code)object).cp;
ConstantPool constantPool21 = ((Code)object).cp;
Class clazz33 = class$javax$baja$sys$BComponent;
if (clazz33 == null) {
clazz33 = class$javax$baja$sys$BComponent = SyntheticCompiler.class("[Ljavax.baja.sys.BComponent;", false);
}
int n19 = constantPool21.cls(clazz33);
Class[] classArray12 = new Class[1];
Class clazz34 = class$javax$baja$sys$Context;
if (clazz34 == null) {
clazz34 = classArray12[0] = (class$javax$baja$sys$Context = SyntheticCompiler.class("[Ljavax.baja.sys.Context;", false));
}
if ((clazz30 = class$javax$baja$agent$AgentList) == null) {
clazz30 = class$javax$baja$agent$AgentList = SyntheticCompiler.class("[Ljavax.baja.agent.AgentList;", false);
}
((Code)object).add(182, constantPool20.method(n19, "getAgents", Jvm.methodDescriptor(classArray12, clazz30)));
((Code)object).add(176);
} else if (typeInfo.is(BComplex.TYPE)) {
Class clazz35;
ConstantPool constantPool22 = ((Code)object).cp;
ConstantPool constantPool23 = assembler.cp;
Class clazz36 = class$javax$baja$sys$Sys;
if (clazz36 == null) {
clazz36 = class$javax$baja$sys$Sys = SyntheticCompiler.class("[Ljavax.baja.sys.Sys;", false);
}
int n20 = constantPool23.cls(clazz36);
int n21 = assembler.cp.utf("getRegistry");
Class[] classArray13 = new Class[]{};
Class clazz37 = class$javax$baja$registry$Registry;
if (clazz37 == null) {
clazz37 = class$javax$baja$registry$Registry = SyntheticCompiler.class("[Ljavax.baja.registry.Registry;", false);
}
((Code)object).add(184, constantPool22.method(n20, n21, Jvm.methodDescriptor(classArray13, clazz37)));
ConstantPool constantPool24 = ((Code)object).cp;
ConstantPool constantPool25 = ((Code)object).cp;
Class clazz38 = class$javax$baja$sys$BComplex;
if (clazz38 == null) {
clazz38 = class$javax$baja$sys$BComplex = SyntheticCompiler.class("[Ljavax.baja.sys.BComplex;", false);
}
int n22 = constantPool25.cls(clazz38);
int n23 = ((Code)object).cp.utf("TYPE");
Class clazz39 = class$javax$baja$sys$Type;
if (clazz39 == null) {
clazz39 = class$javax$baja$sys$Type = SyntheticCompiler.class("[Ljavax.baja.sys.Type;", false);
}
((Code)object).add(178, constantPool24.field(n22, n23, Jvm.fieldDescriptor(clazz39)));
ConstantPool constantPool26 = ((Code)object).cp;
ConstantPool constantPool27 = ((Code)object).cp;
Class clazz40 = class$javax$baja$sys$Type;
if (clazz40 == null) {
clazz40 = class$javax$baja$sys$Type = SyntheticCompiler.class("[Ljavax.baja.sys.Type;", false);
}
int n24 = constantPool27.cls(clazz40);
ConstantPool constantPool28 = ((Code)object).cp;
int n25 = ((Code)object).cp.utf("getTypeInfo");
Class[] classArray14 = new Class[]{};
Class clazz41 = class$javax$baja$registry$TypeInfo;
if (clazz41 == null) {
clazz41 = class$javax$baja$registry$TypeInfo = SyntheticCompiler.class("[Ljavax.baja.registry.TypeInfo;", false);
}
((Code)object).invokeInterface(constantPool26.iface(n24, constantPool28.nt(n25, Jvm.methodDescriptor(classArray14, clazz41))), 1);
ConstantPool constantPool29 = ((Code)object).cp;
ConstantPool constantPool30 = ((Code)object).cp;
Class clazz42 = class$javax$baja$registry$Registry;
if (clazz42 == null) {
clazz42 = class$javax$baja$registry$Registry = SyntheticCompiler.class("[Ljavax.baja.registry.Registry;", false);
}
int n26 = constantPool30.cls(clazz42);
ConstantPool constantPool31 = ((Code)object).cp;
int n27 = ((Code)object).cp.utf("getAgents");
Class[] classArray15 = new Class[1];
Class clazz43 = class$javax$baja$registry$TypeInfo;
if (clazz43 == null) {
clazz43 = classArray15[0] = (class$javax$baja$registry$TypeInfo = SyntheticCompiler.class("[Ljavax.baja.registry.TypeInfo;", false));
}
if ((clazz35 = class$javax$baja$agent$AgentList) == null) {
clazz35 = class$javax$baja$agent$AgentList = SyntheticCompiler.class("[Ljavax.baja.agent.AgentList;", false);
}
((Code)object).invokeInterface(constantPool29.iface(n26, constantPool31.nt(n27, Jvm.methodDescriptor(classArray15, clazz35))), 2);
((Code)object).add(176);
} else if (typeInfo.is(BFrozenEnum.TYPE)) {
Class clazz44;
ConstantPool constantPool32 = ((Code)object).cp;
ConstantPool constantPool33 = assembler.cp;
Class clazz45 = class$javax$baja$sys$Sys;
if (clazz45 == null) {
clazz45 = class$javax$baja$sys$Sys = SyntheticCompiler.class("[Ljavax.baja.sys.Sys;", false);
}
int n28 = constantPool33.cls(clazz45);
int n29 = assembler.cp.utf("getRegistry");
Class[] classArray16 = new Class[]{};
Class clazz46 = class$javax$baja$registry$Registry;
if (clazz46 == null) {
clazz46 = class$javax$baja$registry$Registry = SyntheticCompiler.class("[Ljavax.baja.registry.Registry;", false);
}
((Code)object).add(184, constantPool32.method(n28, n29, Jvm.methodDescriptor(classArray16, clazz46)));
ConstantPool constantPool34 = ((Code)object).cp;
ConstantPool constantPool35 = ((Code)object).cp;
Class clazz47 = class$javax$baja$sys$BFrozenEnum;
if (clazz47 == null) {
clazz47 = class$javax$baja$sys$BFrozenEnum = SyntheticCompiler.class("[Ljavax.baja.sys.BFrozenEnum;", false);
}
int n30 = constantPool35.cls(clazz47);
int n31 = ((Code)object).cp.utf("TYPE");
Class clazz48 = class$javax$baja$sys$Type;
if (clazz48 == null) {
clazz48 = class$javax$baja$sys$Type = SyntheticCompiler.class("[Ljavax.baja.sys.Type;", false);
}
((Code)object).add(178, constantPool34.field(n30, n31, Jvm.fieldDescriptor(clazz48)));
ConstantPool constantPool36 = ((Code)object).cp;
ConstantPool constantPool37 = ((Code)object).cp;
Class clazz49 = class$javax$baja$sys$Type;
if (clazz49 == null) {
clazz49 = class$javax$baja$sys$Type = SyntheticCompiler.class("[Ljavax.baja.sys.Type;", false);
}
int n32 = constantPool37.cls(clazz49);
ConstantPool constantPool38 = ((Code)object).cp;
int n33 = ((Code)object).cp.utf("getTypeInfo");
Class[] classArray17 = new Class[]{};
Class clazz50 = class$javax$baja$registry$TypeInfo;
if (clazz50 == null) {
clazz50 = class$javax$baja$registry$TypeInfo = SyntheticCompiler.class("[Ljavax.baja.registry.TypeInfo;", false);
}
((Code)object).invokeInterface(constantPool36.iface(n32, constantPool38.nt(n33, Jvm.methodDescriptor(classArray17, clazz50))), 1);
ConstantPool constantPool39 = ((Code)object).cp;
ConstantPool constantPool40 = ((Code)object).cp;
Class clazz51 = class$javax$baja$registry$Registry;
if (clazz51 == null) {
clazz51 = class$javax$baja$registry$Registry = SyntheticCompiler.class("[Ljavax.baja.registry.Registry;", false);
}
int n34 = constantPool40.cls(clazz51);
ConstantPool constantPool41 = ((Code)object).cp;
int n35 = ((Code)object).cp.utf("getAgents");
Class[] classArray18 = new Class[1];
Class clazz52 = class$javax$baja$registry$TypeInfo;
if (clazz52 == null) {
clazz52 = classArray18[0] = (class$javax$baja$registry$TypeInfo = SyntheticCompiler.class("[Ljavax.baja.registry.TypeInfo;", false));
}
if ((clazz44 = class$javax$baja$agent$AgentList) == null) {
clazz44 = class$javax$baja$agent$AgentList = SyntheticCompiler.class("[Ljavax.baja.agent.AgentList;", false);
}
((Code)object).invokeInterface(constantPool39.iface(n34, constantPool41.nt(n35, Jvm.methodDescriptor(classArray18, clazz44))), 2);
((Code)object).add(176);
} else if (typeInfo.is(BSimple.TYPE)) {
Class clazz53;
ConstantPool constantPool42 = ((Code)object).cp;
ConstantPool constantPool43 = assembler.cp;
Class clazz54 = class$javax$baja$sys$Sys;
if (clazz54 == null) {
clazz54 = class$javax$baja$sys$Sys = SyntheticCompiler.class("[Ljavax.baja.sys.Sys;", false);
}
int n36 = constantPool43.cls(clazz54);
int n37 = assembler.cp.utf("getRegistry");
Class[] classArray19 = new Class[]{};
Class clazz55 = class$javax$baja$registry$Registry;
if (clazz55 == null) {
clazz55 = class$javax$baja$registry$Registry = SyntheticCompiler.class("[Ljavax.baja.registry.Registry;", false);
}
((Code)object).add(184, constantPool42.method(n36, n37, Jvm.methodDescriptor(classArray19, clazz55)));
ConstantPool constantPool44 = ((Code)object).cp;
ConstantPool constantPool45 = ((Code)object).cp;
Class clazz56 = class$javax$baja$sys$BSimple;
if (clazz56 == null) {
clazz56 = class$javax$baja$sys$BSimple = SyntheticCompiler.class("[Ljavax.baja.sys.BSimple;", false);
}
int n38 = constantPool45.cls(clazz56);
int n39 = ((Code)object).cp.utf("TYPE");
Class clazz57 = class$javax$baja$sys$Type;
if (clazz57 == null) {
clazz57 = class$javax$baja$sys$Type = SyntheticCompiler.class("[Ljavax.baja.sys.Type;", false);
}
((Code)object).add(178, constantPool44.field(n38, n39, Jvm.fieldDescriptor(clazz57)));
ConstantPool constantPool46 = ((Code)object).cp;
ConstantPool constantPool47 = ((Code)object).cp;
Class clazz58 = class$javax$baja$sys$Type;
if (clazz58 == null) {
clazz58 = class$javax$baja$sys$Type = SyntheticCompiler.class("[Ljavax.baja.sys.Type;", false);
}
int n40 = constantPool47.cls(clazz58);
ConstantPool constantPool48 = ((Code)object).cp;
int n41 = ((Code)object).cp.utf("getTypeInfo");
Class[] classArray20 = new Class[]{};
Class clazz59 = class$javax$baja$registry$TypeInfo;
if (clazz59 == null) {
clazz59 = class$javax$baja$registry$TypeInfo = SyntheticCompiler.class("[Ljavax.baja.registry.TypeInfo;", false);
}
((Code)object).invokeInterface(constantPool46.iface(n40, constantPool48.nt(n41, Jvm.methodDescriptor(classArray20, clazz59))), 1);
ConstantPool constantPool49 = ((Code)object).cp;
ConstantPool constantPool50 = ((Code)object).cp;
Class clazz60 = class$javax$baja$registry$Registry;
if (clazz60 == null) {
clazz60 = class$javax$baja$registry$Registry = SyntheticCompiler.class("[Ljavax.baja.registry.Registry;", false);
}
int n42 = constantPool50.cls(clazz60);
ConstantPool constantPool51 = ((Code)object).cp;
int n43 = ((Code)object).cp.utf("getAgents");
Class[] classArray21 = new Class[1];
Class clazz61 = class$javax$baja$registry$TypeInfo;
if (clazz61 == null) {
clazz61 = classArray21[0] = (class$javax$baja$registry$TypeInfo = SyntheticCompiler.class("[Ljavax.baja.registry.TypeInfo;", false));
}
if ((clazz53 = class$javax$baja$agent$AgentList) == null) {
clazz53 = class$javax$baja$agent$AgentList = SyntheticCompiler.class("[Ljavax.baja.agent.AgentList;", false);
}
((Code)object).invokeInterface(constantPool49.iface(n42, constantPool51.nt(n43, Jvm.methodDescriptor(classArray21, clazz53))), 2);
((Code)object).add(176);
} else {
throw new IllegalArgumentException("Specified super class '" + typeInfo + "' can not be used to create a synthetic type.");
}
Class[] classArray22 = new Class[1];
Class clazz62 = class$javax$baja$sys$Context;
if (clazz62 == null) {
clazz62 = classArray22[0] = (class$javax$baja$sys$Context = SyntheticCompiler.class("[Ljavax.baja.sys.Context;", false));
}
if ((clazz15 = class$javax$baja$agent$AgentList) == null) {
clazz15 = class$javax$baja$agent$AgentList = SyntheticCompiler.class("[Ljavax.baja.agent.AgentList;", false);
}
assembler.addMethod(new MethodInfo(assembler, "getAgents", Jvm.methodDescriptor(classArray22, clazz15), 1, (Code)object));
}
if (typeInfo.is(BIService.TYPE)) {
object = new Code(assembler);
((Code)object).add(4);
ConstantPool constantPool52 = ((Code)object).cp;
Class clazz63 = class$javax$baja$sys$Type;
if (clazz63 == null) {
clazz63 = class$javax$baja$sys$Type = SyntheticCompiler.class("[Ljavax.baja.sys.Type;", false);
}
((Code)object).add(189, constantPool52.cls(clazz63));
((Code)object).add(89);
((Code)object).add(3);
((Code)object).add(178, assembler.cp.field(fieldInfo));
((Code)object).add(83);
((Code)object).add(176);
Class[] classArray23 = new Class[]{};
Class clazz64 = array$Ljavax$baja$sys$Type;
if (clazz64 == null) {
clazz64 = array$Ljavax$baja$sys$Type = SyntheticCompiler.class("[Ljavax.baja.sys.Type;", true);
}
assembler.addMethod(new MethodInfo(assembler, "getServiceTypes", Jvm.methodDescriptor(classArray23, clazz64), 1, (Code)object));
}
if (typeInfo.is(BComplex.TYPE)) {
object = new Code(assembler);
((Code)object).add(42);
((Code)object).add(183, ((Code)object).cp.method(assembler.superClass, assembler.cp.utf("<init>"), Jvm.methodDescriptor(new Class[0], Void.TYPE)));
((Code)object).add(177);
assembler.addMethod(new MethodInfo(assembler, assembler.cp.utf("<init>"), Jvm.methodDescriptor(new Class[0], Void.TYPE), 1, (Code)object));
} else if (typeInfo.is(BFrozenEnum.TYPE)) {
object = new Code(assembler);
((Code)object).add(42);
((Code)object).add(27);
((Code)object).add(183, ((Code)object).cp.method(assembler.superClass, assembler.cp.utf("<init>"), Jvm.methodDescriptor(new Class[]{Integer.TYPE}, Void.TYPE)));
((Code)object).add(177);
assembler.addMethod(new MethodInfo(assembler, assembler.cp.utf("<init>"), Jvm.methodDescriptor(new Class[]{Integer.TYPE}, Void.TYPE), 1, (Code)object));
} else if (typeInfo.is(BSimple.TYPE)) {
object = new Code(assembler);
((Code)object).add(42);
((Code)object).add(89);
((Code)object).add(183, ((Code)object).cp.method(assembler.superClass, assembler.cp.utf("<init>"), Jvm.methodDescriptor(new Class[0], Void.TYPE)));
if (!bl) {
((Code)object).add(43);
((Code)object).add(181, assembler.cp.field(fieldInfo3));
((Code)object).add(177);
int n44 = assembler.cp.utf("<init>");
Class[] classArray24 = new Class[1];
Class clazz65 = class$java$lang$String;
if (clazz65 == null) {
clazz65 = class$java$lang$String = SyntheticCompiler.class("[Ljava.lang.String;", false);
}
classArray24[0] = clazz65;
assembler.addMethod(new MethodInfo(assembler, n44, Jvm.methodDescriptor(classArray24, Void.TYPE), 1, (Code)object));
} else {
((Code)object).add(177);
assembler.addMethod(new MethodInfo(assembler, assembler.cp.utf("<init>"), Jvm.methodDescriptor(new Class[0], Void.TYPE), 1, (Code)object));
}
if (!bl) {
Class clazz66;
Class clazz67;
Class clazz68;
object = new Code(assembler);
((Code)object).add(42);
((Code)object).add(180, assembler.cp.field(fieldInfo3));
ConstantPool constantPool53 = ((Code)object).cp;
ConstantPool constantPool54 = ((Code)object).cp;
Class clazz69 = class$java$lang$String;
if (clazz69 == null) {
clazz69 = class$java$lang$String = SyntheticCompiler.class("[Ljava.lang.String;", false);
}
((Code)object).add(182, constantPool53.method(constantPool54.cls(clazz69), "hashCode", Jvm.methodDescriptor(new Class[0], Integer.TYPE)));
((Code)object).add(172);
assembler.addMethod(new MethodInfo(assembler, "hashCode", Jvm.methodDescriptor(new Class[0], Integer.TYPE), 1, (Code)object));
object = new Code(assembler);
((Code)object).add(43);
((Code)object).add(193, assembler.thisClass);
((Code)object).code.u1(153);
((Code)object).code.u2(18);
((Code)object).add(42);
((Code)object).add(180, assembler.cp.field(fieldInfo3));
((Code)object).add(43);
((Code)object).add(192, assembler.thisClass);
((Code)object).add(180, assembler.cp.field(fieldInfo3));
ConstantPool constantPool55 = ((Code)object).cp;
ConstantPool constantPool56 = ((Code)object).cp;
Class clazz70 = class$java$lang$String;
if (clazz70 == null) {
clazz70 = class$java$lang$String = SyntheticCompiler.class("[Ljava.lang.String;", false);
}
int n45 = constantPool56.cls(clazz70);
Class[] classArray25 = new Class[1];
Class clazz71 = class$java$lang$Object;
if (clazz71 == null) {
clazz71 = class$java$lang$Object = SyntheticCompiler.class("[Ljava.lang.Object;", false);
}
classArray25[0] = clazz71;
((Code)object).add(182, constantPool55.method(n45, "equals", Jvm.methodDescriptor(classArray25, Boolean.TYPE)));
((Code)object).add(172);
((Code)object).add(3);
((Code)object).add(172);
Class[] classArray26 = new Class[1];
Class clazz72 = class$java$lang$Object;
if (clazz72 == null) {
clazz72 = class$java$lang$Object = SyntheticCompiler.class("[Ljava.lang.Object;", false);
}
classArray26[0] = clazz72;
assembler.addMethod(new MethodInfo(assembler, "equals", Jvm.methodDescriptor(classArray26, Boolean.TYPE), 1, (Code)object));
object = new Code(assembler);
((Code)object).add(42);
((Code)object).add(180, assembler.cp.field(fieldInfo3));
((Code)object).add(176);
Class[] classArray27 = new Class[1];
Class clazz73 = class$javax$baja$sys$Context;
if (clazz73 == null) {
clazz73 = classArray27[0] = (class$javax$baja$sys$Context = SyntheticCompiler.class("[Ljavax.baja.sys.Context;", false));
}
if ((clazz68 = class$java$lang$String) == null) {
clazz68 = class$java$lang$String = SyntheticCompiler.class("[Ljava.lang.String;", false);
}
assembler.addMethod(new MethodInfo(assembler, "toString", Jvm.methodDescriptor(classArray27, clazz68), 1, (Code)object));
object = new Code(assembler);
((Code)object).add(43);
((Code)object).add(42);
((Code)object).add(180, assembler.cp.field(fieldInfo3));
ConstantPool constantPool57 = ((Code)object).cp;
ConstantPool constantPool58 = ((Code)object).cp;
Class clazz74 = class$java$lang$String;
if (clazz74 == null) {
clazz74 = class$java$lang$String = SyntheticCompiler.class("[Ljava.lang.String;", false);
}
int n46 = constantPool58.cls(clazz74);
Class[] classArray28 = new Class[]{};
Class clazz75 = array$B;
if (clazz75 == null) {
clazz75 = array$B = SyntheticCompiler.class("[B", true);
}
((Code)object).add(182, constantPool57.method(n46, "getBytes", Jvm.methodDescriptor(classArray28, clazz75)));
ConstantPool constantPool59 = ((Code)object).cp;
ConstantPool constantPool60 = ((Code)object).cp;
Class clazz76 = class$java$io$DataOutput;
if (clazz76 == null) {
clazz76 = class$java$io$DataOutput = SyntheticCompiler.class("[Ljava.io.DataOutput;", false);
}
int n47 = constantPool60.cls(clazz76);
ConstantPool constantPool61 = ((Code)object).cp;
int n48 = ((Code)object).cp.utf("write");
Class[] classArray29 = new Class[1];
Class clazz77 = array$B;
if (clazz77 == null) {
clazz77 = array$B = SyntheticCompiler.class("[B", true);
}
classArray29[0] = clazz77;
((Code)object).invokeInterface(constantPool59.iface(n47, constantPool61.nt(n48, Jvm.methodDescriptor(classArray29, Void.TYPE))), 2);
((Code)object).add(177);
Class[] classArray30 = new Class[1];
Class clazz78 = class$java$io$DataOutput;
if (clazz78 == null) {
clazz78 = class$java$io$DataOutput = SyntheticCompiler.class("[Ljava.io.DataOutput;", false);
}
classArray30[0] = clazz78;
assembler.addMethod(new MethodInfo(assembler, "encode", Jvm.methodDescriptor(classArray30, Void.TYPE), 1, (Code)object));
object = new Code(assembler);
ConstantPool constantPool62 = assembler.cp;
Class clazz79 = class$javax$baja$io$ByteBuffer;
if (clazz79 == null) {
clazz79 = class$javax$baja$io$ByteBuffer = SyntheticCompiler.class("[Ljavax.baja.io.ByteBuffer;", false);
}
((Code)object).add(187, constantPool62.cls(clazz79));
((Code)object).add(89);
ConstantPool constantPool63 = ((Code)object).cp;
ConstantPool constantPool64 = ((Code)object).cp;
Class clazz80 = class$javax$baja$io$ByteBuffer;
if (clazz80 == null) {
clazz80 = class$javax$baja$io$ByteBuffer = SyntheticCompiler.class("[Ljavax.baja.io.ByteBuffer;", false);
}
((Code)object).add(183, constantPool63.method(constantPool64.cls(clazz80), assembler.cp.utf("<init>"), Jvm.methodDescriptor(new Class[0], Void.TYPE)));
((Code)object).add(77);
((Code)object).add(44);
((Code)object).add(43);
ConstantPool constantPool65 = ((Code)object).cp;
ConstantPool constantPool66 = ((Code)object).cp;
Class clazz81 = class$java$io$DataInput;
if (clazz81 == null) {
clazz81 = class$java$io$DataInput = SyntheticCompiler.class("[Ljava.io.DataInput;", false);
}
((Code)object).invokeInterface(constantPool65.iface(constantPool66.cls(clazz81), ((Code)object).cp.nt(((Code)object).cp.utf("readByte"), Jvm.methodDescriptor(new Class[0], Byte.TYPE))), 1);
ConstantPool constantPool67 = ((Code)object).cp;
ConstantPool constantPool68 = ((Code)object).cp;
Class clazz82 = class$javax$baja$io$ByteBuffer;
if (clazz82 == null) {
clazz82 = class$javax$baja$io$ByteBuffer = SyntheticCompiler.class("[Ljavax.baja.io.ByteBuffer;", false);
}
((Code)object).add(182, constantPool67.method(constantPool68.cls(clazz82), "writeByte", Jvm.methodDescriptor(new Class[]{Integer.TYPE}, Void.TYPE)));
((Code)object).code.u1(167);
((Code)object).code.u2(-10);
((Code)object).add(87);
((Code)object).add(187, assembler.thisClass);
((Code)object).add(89);
ConstantPool constantPool69 = ((Code)object).cp;
Class clazz83 = class$java$lang$String;
if (clazz83 == null) {
clazz83 = class$java$lang$String = SyntheticCompiler.class("[Ljava.lang.String;", false);
}
((Code)object).add(187, constantPool69.cls(clazz83));
((Code)object).add(89);
((Code)object).add(44);
ConstantPool constantPool70 = ((Code)object).cp;
ConstantPool constantPool71 = ((Code)object).cp;
Class clazz84 = class$javax$baja$io$ByteBuffer;
if (clazz84 == null) {
clazz84 = class$javax$baja$io$ByteBuffer = SyntheticCompiler.class("[Ljavax.baja.io.ByteBuffer;", false);
}
int n49 = constantPool71.cls(clazz84);
Class[] classArray31 = new Class[]{};
Class clazz85 = array$B;
if (clazz85 == null) {
clazz85 = array$B = SyntheticCompiler.class("[B", true);
}
((Code)object).add(182, constantPool70.method(n49, "toByteArray", Jvm.methodDescriptor(classArray31, clazz85)));
ConstantPool constantPool72 = ((Code)object).cp;
ConstantPool constantPool73 = ((Code)object).cp;
Class clazz86 = class$java$lang$String;
if (clazz86 == null) {
clazz86 = class$java$lang$String = SyntheticCompiler.class("[Ljava.lang.String;", false);
}
int n50 = constantPool73.cls(clazz86);
int n51 = assembler.cp.utf("<init>");
Class[] classArray32 = new Class[1];
Class clazz87 = array$B;
if (clazz87 == null) {
clazz87 = array$B = SyntheticCompiler.class("[B", true);
}
classArray32[0] = clazz87;
((Code)object).add(183, constantPool72.method(n50, n51, Jvm.methodDescriptor(classArray32, Void.TYPE)));
ConstantPool constantPool74 = ((Code)object).cp;
int n52 = assembler.thisClass;
int n53 = assembler.cp.utf("<init>");
Class[] classArray33 = new Class[1];
Class clazz88 = class$java$lang$String;
if (clazz88 == null) {
clazz88 = class$java$lang$String = SyntheticCompiler.class("[Ljava.lang.String;", false);
}
classArray33[0] = clazz88;
((Code)object).add(183, constantPool74.method(n52, n53, Jvm.methodDescriptor(classArray33, Void.TYPE)));
((Code)object).add(176);
Class[] classArray34 = new Class[1];
Class clazz89 = class$java$io$DataInput;
if (clazz89 == null) {
clazz89 = classArray34[0] = (class$java$io$DataInput = SyntheticCompiler.class("[Ljava.io.DataInput;", false));
}
if ((clazz67 = class$javax$baja$sys$BObject) == null) {
clazz67 = class$javax$baja$sys$BObject = SyntheticCompiler.class("[Ljavax.baja.sys.BObject;", false);
}
assembler.addMethod(new MethodInfo(assembler, "decode", Jvm.methodDescriptor(classArray34, clazz67), 1, (Code)object));
object = new Code(assembler);
((Code)object).add(42);
((Code)object).add(180, assembler.cp.field(fieldInfo3));
((Code)object).add(176);
Class[] classArray35 = new Class[]{};
Class clazz90 = class$java$lang$String;
if (clazz90 == null) {
clazz90 = class$java$lang$String = SyntheticCompiler.class("[Ljava.lang.String;", false);
}
assembler.addMethod(new MethodInfo(assembler, "encodeToString", Jvm.methodDescriptor(classArray35, clazz90), 1, (Code)object));
object = new Code(assembler);
((Code)object).add(187, assembler.thisClass);
((Code)object).add(89);
((Code)object).add(43);
ConstantPool constantPool75 = ((Code)object).cp;
int n54 = assembler.thisClass;
int n55 = assembler.cp.utf("<init>");
Class[] classArray36 = new Class[1];
Class clazz91 = class$java$lang$String;
if (clazz91 == null) {
clazz91 = class$java$lang$String = SyntheticCompiler.class("[Ljava.lang.String;", false);
}
classArray36[0] = clazz91;
((Code)object).add(183, constantPool75.method(n54, n55, Jvm.methodDescriptor(classArray36, Void.TYPE)));
((Code)object).add(176);
Class[] classArray37 = new Class[1];
Class clazz92 = class$java$lang$String;
if (clazz92 == null) {
clazz92 = classArray37[0] = (class$java$lang$String = SyntheticCompiler.class("[Ljava.lang.String;", false));
}
if ((clazz66 = class$javax$baja$sys$BObject) == null) {
clazz66 = class$javax$baja$sys$BObject = SyntheticCompiler.class("[Ljavax.baja.sys.BObject;", false);
}
assembler.addMethod(new MethodInfo(assembler, "decodeFromString", Jvm.methodDescriptor(classArray37, clazz66), 1, (Code)object));
}
}
object = assembler.compile();
return object;
}
static /* synthetic */ Class class(String string, boolean bl) {
try {
Class<?> clazz = Class.forName(string);
if (!bl) {
clazz = clazz.getComponentType();
}
return clazz;
}
catch (ClassNotFoundException classNotFoundException) {
throw new NoClassDefFoundError(classNotFoundException.getMessage());
}
}
}
@@ -0,0 +1,214 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* javax.baja.xml.XElem
* javax.baja.xml.XParser
*/
package com.tridium.sys.schema;
import com.tridium.sys.Nre;
import com.tridium.sys.module.NModule;
import com.tridium.sys.schema.ComplexIntrospector;
import com.tridium.sys.schema.ComplexType;
import com.tridium.sys.schema.NAction;
import com.tridium.sys.schema.NProperty;
import com.tridium.sys.schema.NSlot;
import com.tridium.sys.schema.NTopic;
import com.tridium.sys.schema.SyntheticComplexSlotMap;
import com.tridium.sys.schema.SyntheticComplexType;
import com.tridium.sys.schema.SyntheticComponentSlotMap;
import com.tridium.util.jar.JarEntry;
import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Arrays;
import javax.baja.io.BIEncodable;
import javax.baja.io.ValueDocDecoder;
import javax.baja.sys.BFacets;
import javax.baja.sys.BValue;
import javax.baja.sys.ModuleException;
import javax.baja.sys.Type;
import javax.baja.util.BTypeSpec;
import javax.baja.xml.XElem;
import javax.baja.xml.XParser;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class SyntheticComplexIntrospector
extends ComplexIntrospector {
static /* synthetic */ Class class$javax$baja$sys$BComponent;
static /* synthetic */ Class class$javax$baja$sys$BComplex;
protected void mapSlots() throws Exception {
XElem[] xElemArray;
NSlot nSlot;
XElem[] xElemArray2;
Object object;
NModule nModule = Nre.moduleManager.getModuleForClass(this.cls);
ArrayList<NSlot> arrayList = new ArrayList<NSlot>();
ArrayList<NProperty> arrayList2 = new ArrayList<NProperty>();
ArrayList<NSlot> arrayList3 = new ArrayList<NSlot>();
ArrayList<NSlot> arrayList4 = new ArrayList<NSlot>();
ComplexType complexType = (ComplexType)this.cls.getSuperclass().getField("TYPE").get(null);
if (complexType instanceof SyntheticComplexType) {
object = (Field[])complexType;
arrayList.addAll(Arrays.asList(((SyntheticComplexType)object).slots));
arrayList2.addAll(Arrays.asList(((SyntheticComplexType)object).properties));
arrayList3.addAll(Arrays.asList(((SyntheticComplexType)object).actions));
arrayList4.addAll(Arrays.asList(((SyntheticComplexType)object).topics));
} else {
object = this.resolveFields();
int n = 0;
while (n < ((Field[])object).length) {
xElemArray2 = object[n];
if (xElemArray2 != null) {
Class<?> clazz = xElemArray2.getType();
nSlot = null;
try {
if (clazz == propertyClass) {
xElemArray = this.mapProperty((NProperty)this.getSlotField((Field)xElemArray2));
arrayList2.add((NProperty)xElemArray);
nSlot = xElemArray;
} else if (clazz == actionClass) {
xElemArray = this.mapAction((NAction)this.getSlotField((Field)xElemArray2));
arrayList3.add((NSlot)xElemArray);
nSlot = xElemArray;
} else if (clazz == topicClass) {
xElemArray = this.mapTopic((NTopic)this.getSlotField((Field)xElemArray2));
arrayList4.add((NSlot)xElemArray);
nSlot = xElemArray;
}
}
catch (Exception exception) {
this.err("" + xElemArray2);
throw exception;
}
if (nSlot != null) {
nSlot.index = arrayList.size();
arrayList.add(nSlot);
}
}
++n;
}
}
if (nModule.jarFile != null) {
object = nModule.jarFile.getJarEntry("META-INF/module.xml");
if (object == null) {
object = nModule.jarFile.getJarEntry("meta-inf/module.xml");
}
if (object == null) {
throw new ModuleException("Module missing META-INF/module.xml: " + nModule.jarFile.getFile());
}
XElem xElem = XParser.make((InputStream)new BufferedInputStream(((JarEntry)object).getInputStream())).parse();
if (xElem.elem("types") != null) {
xElemArray2 = xElem.elem("types").elems("type");
int n = 0;
while (n < xElemArray2.length) {
if (xElemArray2[n].get("name").equals(this.typeName) && (nSlot = xElemArray2[n].elem("slots")) != null) {
xElemArray = nSlot.elems("property");
int n2 = 0;
while (n2 < xElemArray.length) {
block27: {
try {
NSlot nSlot2;
String string = xElemArray[n2].get("name");
int n3 = xElemArray[n2].geti("flags", 0);
BTypeSpec bTypeSpec = BTypeSpec.make(xElemArray[n2].get("type"));
BValue bValue = bTypeSpec.getResolvedType().is(BIEncodable.TYPE) ? (BValue)((BIEncodable)((Object)bTypeSpec.getInstance())).decodeFromString(xElemArray[n2].get("value")) : ValueDocDecoder.unmarshal(xElemArray[n2].get("value"));
BFacets bFacets = (BFacets)BFacets.DEFAULT.decodeFromString(xElemArray[n2].get("facets", ""));
NProperty nProperty = new NProperty(string, n3, bValue, bFacets, true);
boolean bl = false;
int n4 = 0;
while (n4 < arrayList2.size()) {
nSlot2 = (NProperty)arrayList2.get(n4);
if (nSlot2.name.equals(nProperty.name)) {
arrayList2.set(n4, nProperty);
bl = true;
break;
}
++n4;
}
if (bl) {
n4 = 0;
while (n4 < arrayList.size()) {
nSlot2 = (NSlot)arrayList.get(n4);
if (nSlot2.name.equals(nProperty.name)) {
nProperty.index = n4;
arrayList.set(n4, nProperty);
break block27;
}
++n4;
}
break block27;
}
nProperty.index = arrayList.size();
arrayList2.add(nProperty);
arrayList.add(nProperty);
}
catch (IOException iOException) {
iOException.printStackTrace();
}
}
++n2;
}
break;
}
++n;
}
}
}
this.slots = arrayList.toArray(new NSlot[arrayList.size()]);
this.properties = arrayList2.toArray(new NProperty[arrayList2.size()]);
this.actions = arrayList3.toArray(new NAction[arrayList3.size()]);
this.topics = arrayList4.toArray(new NTopic[arrayList4.size()]);
if (this.superSlotsToFix != null) {
this.fixSuperSlots();
}
}
protected Type makeType() {
return new SyntheticComplexType(this, this.cls);
}
protected void generateSlotMapClass() throws Exception {
Class clazz = class$javax$baja$sys$BComponent;
if (clazz == null) {
clazz = class$javax$baja$sys$BComponent = SyntheticComplexIntrospector.class("[Ljavax.baja.sys.BComponent;", false);
}
if (clazz.isAssignableFrom(this.cls)) {
this.slotMap = new SyntheticComponentSlotMap();
} else {
Class clazz2 = class$javax$baja$sys$BComplex;
if (clazz2 == null) {
clazz2 = class$javax$baja$sys$BComplex = SyntheticComplexIntrospector.class("[Ljavax.baja.sys.BComplex;", false);
}
if (clazz2.isAssignableFrom(this.cls)) {
this.slotMap = new SyntheticComplexSlotMap();
} else {
throw new IllegalStateException();
}
}
}
static /* synthetic */ Class class(String string, boolean bl) {
try {
Class<?> clazz = Class.forName(string);
if (!bl) {
clazz = clazz.getComponentType();
}
return clazz;
}
catch (ClassNotFoundException classNotFoundException) {
throw new NoClassDefFoundError(classNotFoundException.getMessage());
}
}
public SyntheticComplexIntrospector(int n, Class clazz) {
super(n, clazz);
}
}
@@ -0,0 +1,153 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* javax.baja.nre.util.IntHashMap
*/
package com.tridium.sys.schema;
import com.tridium.sys.schema.ComplexSlotMap;
import com.tridium.sys.schema.NProperty;
import com.tridium.sys.schema.NSlot;
import com.tridium.sys.schema.NSyntheticAction;
import javax.baja.nre.util.IntHashMap;
import javax.baja.sys.BBoolean;
import javax.baja.sys.BComplex;
import javax.baja.sys.BComponent;
import javax.baja.sys.BDouble;
import javax.baja.sys.BFloat;
import javax.baja.sys.BInteger;
import javax.baja.sys.BLong;
import javax.baja.sys.BString;
import javax.baja.sys.BValue;
import javax.baja.sys.Context;
import javax.baja.sys.Slot;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class SyntheticComplexSlotMap
extends ComplexSlotMap {
private IntHashMap propValues;
private IntHashMap propFlags;
public BComplex newBComplexInstance() {
return (BComplex)this.getType().getInstance();
}
public ComplexSlotMap newSlotMapInstance() {
return new SyntheticComplexSlotMap();
}
public int getFlags(Slot slot) {
NSlot nSlot = (NSlot)slot;
try {
if (nSlot.isFrozen) {
Integer n = (Integer)this.propFlags.get(nSlot.index);
if (n == null) {
return this.getType().slots[nSlot.index].flags;
}
return n;
}
return nSlot.flags;
}
catch (RuntimeException runtimeException) {
System.out.println("ComponentSlotMap.getFlags: " + nSlot);
System.out.println(" instance.type " + this.getType());
System.out.println(" slot.type: " + nSlot.getDeclaringType());
System.out.println(" slot.index: " + nSlot.index);
System.out.println(" slot.isFrozen: " + nSlot.isFrozen);
System.out.println(" type.slots.length: " + this.getType().slots.length);
System.out.println(" type.defaultFlags.length: " + this.getType().defaultFlags.length);
runtimeException.printStackTrace();
throw runtimeException;
}
}
public void setFlags(Slot slot, int n, Context context) {
}
public BValue g(int n) {
BValue bValue = (BValue)this.propValues.get(n);
if (bValue == null) {
if (((NProperty)this.getType().slots[n]).value.getType().is(BComplex.TYPE)) {
bValue = ((NProperty)this.getType().slots[n]).value.newCopy(true);
this.set(this.getType().slots[n].asProperty(), null, null, bValue, (ComplexSlotMap)bValue.asComplex().fw(1), null);
return bValue;
}
return ((NProperty)this.getType().slots[n]).value;
}
return bValue;
}
public void s(int n, BValue bValue) {
if (((NProperty)this.getType().slots[n]).isEquivalentToDefaultValue(bValue)) {
this.propValues.remove(n);
} else {
this.propValues.put(n, (Object)bValue);
}
}
public boolean gb(int n) {
return ((BBoolean)this.g(n)).getBoolean();
}
public int gi(int n) {
return ((BInteger)this.g(n)).getInt();
}
public long gj(int n) {
return ((BLong)this.g(n)).getLong();
}
public float gf(int n) {
return ((BFloat)this.g(n)).getFloat();
}
public double gd(int n) {
return ((BDouble)this.g(n)).getDouble();
}
public String gs(int n) {
return ((BString)this.g(n)).getString();
}
public void sb(int n, boolean bl) {
this.s(n, BBoolean.make(bl));
}
public void si(int n, int n2) {
this.s(n, BInteger.make(n2));
}
public void sj(int n, long l) {
this.s(n, BLong.make(l));
}
public void sf(int n, float f) {
this.s(n, BFloat.make(f));
}
public void sd(int n, double d) {
this.s(n, BDouble.make(d));
}
public void ss(int n, String string) {
this.s(n, BString.make(string));
}
public BValue invoke(int n, BComponent bComponent, BValue bValue, Context context) {
NSyntheticAction nSyntheticAction = (NSyntheticAction)this.getType().slots[n].asAction();
return nSyntheticAction.invoke(n, bComponent, bValue, context);
}
private final /* synthetic */ void this() {
this.propValues = new IntHashMap();
this.propFlags = new IntHashMap();
}
public SyntheticComplexSlotMap() {
this.this();
}
}
@@ -0,0 +1,145 @@
/*
* Decompiled with CFR 0.152.
*/
package com.tridium.sys.schema;
import com.tridium.sys.schema.ComplexIntrospector;
import com.tridium.sys.schema.ComplexType;
import com.tridium.sys.schema.NAction;
import com.tridium.sys.schema.NProperty;
import com.tridium.sys.schema.NSlot;
import com.tridium.sys.schema.NSyntheticAction;
import com.tridium.sys.schema.NTopic;
import com.tridium.sys.schema.Utils;
import com.tridium.util.ArrayUtil;
import javax.baja.registry.TypeInfo;
import javax.baja.sys.Action;
import javax.baja.sys.BFacets;
import javax.baja.sys.BObject;
import javax.baja.sys.BValue;
import javax.baja.sys.BajaRuntimeException;
import javax.baja.sys.DuplicateSlotException;
import javax.baja.sys.Property;
import javax.baja.sys.Topic;
import javax.baja.sys.Type;
public class SyntheticComplexType
extends ComplexType {
private final Class typeClass;
public BObject getInstance() {
try {
return (BObject)this.typeClass.newInstance();
}
catch (Exception exception) {
throw new BajaRuntimeException(exception);
}
}
public boolean isTransient() {
return this.getModule().isTransient();
}
public void setTypeInfo(TypeInfo typeInfo) {
this.typeInfo = typeInfo;
}
public Property addProperty(String string, Type type, int n, BValue bValue, BFacets bFacets) {
NProperty nProperty = new NProperty(string, n, bValue, bFacets, true);
nProperty.type = type;
nProperty.typeClass = type.getTypeClass();
nProperty.typeAccess = Utils.getTypeAccess(this.typeClass);
nProperty.declaringType = this;
nProperty.index = this.slots.length;
if (this.byName.containsKey(string)) {
NSlot nSlot = (NSlot)this.byName.get(string);
if (!(nSlot instanceof NProperty)) {
throw new DuplicateSlotException(nProperty);
}
NProperty nProperty2 = (NProperty)nSlot;
if (nProperty2.declaringType == this) {
throw new DuplicateSlotException(nProperty);
}
if (!bValue.getType().is(nProperty2.getType())) {
throw new IllegalArgumentException("Default value must match property type: " + nProperty2.getType());
}
if (!nProperty.getType().is(nProperty2.getType())) {
throw new IllegalArgumentException("Property type does not match overridden property's type: " + nProperty2.getType());
}
nProperty2.flags = n;
nProperty2.value = bValue;
nProperty2.facets = bFacets;
nProperty2.declaringType = this;
} else {
this.properties = (NProperty[])ArrayUtil.addOne(this.properties, nProperty);
this.defaultFlags = ArrayUtil.addOne(this.defaultFlags, n);
this.slots = (NSlot[])ArrayUtil.addOne(this.slots, nProperty);
this.byName.put(string, nProperty);
}
return nProperty;
}
public Action addAction(String string, int n, BValue bValue, BFacets bFacets) {
return this.addAction(string, n, bValue, bFacets, null);
}
public Action addAction(String string, int n, BValue bValue, BFacets bFacets, NSyntheticAction.SyntheticActionInvocationHandler syntheticActionInvocationHandler) {
NSyntheticAction nSyntheticAction = new NSyntheticAction(n, bValue, bFacets, syntheticActionInvocationHandler);
nSyntheticAction.declaringType = this;
nSyntheticAction.index = this.slots.length;
nSyntheticAction.name = string;
if (this.byName.containsKey(string)) {
NSlot nSlot = (NSlot)this.byName.get(string);
if (!(nSlot instanceof NAction)) {
throw new DuplicateSlotException(nSyntheticAction);
}
NAction nAction = (NAction)nSlot;
if (bValue == null && nAction.getParameterDefault() != null || bValue != null && nAction.getParameterDefault() == null || bValue != null && nAction.getParameterDefault() != null && !bValue.getType().is(nAction.getParameterDefault().getType())) {
throw new DuplicateSlotException(nSyntheticAction);
}
nAction.flags = n;
nAction.parameterDefault = bValue;
nAction.facets = bFacets;
nAction.declaringType = this;
}
this.actions = (NAction[])ArrayUtil.addOne(this.actions, nSyntheticAction);
this.defaultFlags = ArrayUtil.addOne(this.defaultFlags, n);
this.slots = (NSlot[])ArrayUtil.addOne(this.slots, nSyntheticAction);
this.byName.put(string, nSyntheticAction);
return nSyntheticAction;
}
public Topic addTopic(String string, int n, Type type, BFacets bFacets) {
NTopic nTopic = new NTopic(n, bFacets);
nTopic.declaringType = this;
nTopic.eventClass = type.getTypeClass();
nTopic.index = this.slots.length;
nTopic.name = string;
if (this.byName.containsKey(string)) {
NSlot nSlot = (NSlot)this.byName.get(string);
if (!(nSlot instanceof NTopic)) {
throw new DuplicateSlotException(nTopic);
}
NTopic nTopic2 = (NTopic)nSlot;
if (!type.getTypeSpec().equals(nTopic2.getEventType().getTypeSpec())) {
throw new DuplicateSlotException(nTopic);
}
nTopic2.flags = n;
nTopic2.eventClass = type.getTypeClass();
nTopic2.eventType = type;
nTopic2.facets = bFacets;
nTopic2.declaringType = this;
}
this.topics = (NTopic[])ArrayUtil.addOne(this.topics, nTopic);
this.defaultFlags = ArrayUtil.addOne(this.defaultFlags, n);
this.slots = (NSlot[])ArrayUtil.addOne(this.slots, nTopic);
this.byName.put(string, nTopic);
return nTopic;
}
public SyntheticComplexType(ComplexIntrospector complexIntrospector, Class clazz) {
super(complexIntrospector);
this.typeClass = clazz;
}
}
@@ -0,0 +1,155 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* javax.baja.nre.util.IntHashMap
*/
package com.tridium.sys.schema;
import com.tridium.sys.schema.ComplexSlotMap;
import com.tridium.sys.schema.ComponentSlotMap;
import com.tridium.sys.schema.NProperty;
import com.tridium.sys.schema.NSlot;
import com.tridium.sys.schema.NSyntheticAction;
import javax.baja.nre.util.IntHashMap;
import javax.baja.sys.Action;
import javax.baja.sys.BBoolean;
import javax.baja.sys.BComplex;
import javax.baja.sys.BComponent;
import javax.baja.sys.BDouble;
import javax.baja.sys.BFloat;
import javax.baja.sys.BInteger;
import javax.baja.sys.BLong;
import javax.baja.sys.BString;
import javax.baja.sys.BValue;
import javax.baja.sys.Context;
import javax.baja.sys.Slot;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class SyntheticComponentSlotMap
extends ComponentSlotMap {
private IntHashMap propValues;
private IntHashMap propFlags;
public BComplex newBComplexInstance() {
return (BComplex)this.getType().getInstance();
}
public ComplexSlotMap newSlotMapInstance() {
return new SyntheticComponentSlotMap();
}
public int getFlags(Slot slot) {
NSlot nSlot = (NSlot)slot;
try {
if (nSlot.isFrozen) {
Integer n = (Integer)this.propFlags.get(nSlot.index);
if (n == null) {
return this.getType().slots[nSlot.index].flags;
}
return n;
}
return nSlot.flags;
}
catch (RuntimeException runtimeException) {
System.out.println("ComponentSlotMap.getFlags: " + nSlot);
System.out.println(" instance.type " + this.getType());
System.out.println(" slot.type: " + nSlot.getDeclaringType());
System.out.println(" slot.index: " + nSlot.index);
System.out.println(" slot.isFrozen: " + nSlot.isFrozen);
System.out.println(" type.slots.length: " + this.getType().slots.length);
System.out.println(" type.defaultFlags.length: " + this.getType().defaultFlags.length);
runtimeException.printStackTrace();
throw runtimeException;
}
}
public void setFlags(Slot slot, int n, Context context) {
}
public BValue g(int n) {
BValue bValue = (BValue)this.propValues.get(n);
if (bValue == null) {
if (((NProperty)this.getType().slots[n]).value.getType().is(BComplex.TYPE)) {
bValue = ((NProperty)this.getType().slots[n]).value.newCopy(true);
this.set(this.getType().slots[n].asProperty(), null, null, bValue, (ComplexSlotMap)bValue.asComplex().fw(1), null);
return bValue;
}
return ((NProperty)this.getType().slots[n]).value;
}
return bValue;
}
public void s(int n, BValue bValue) {
if (((NProperty)this.getType().slots[n]).isEquivalentToDefaultValue(bValue) && !this.getType().slots[n].getDeclaringType().is(BComplex.TYPE)) {
this.propValues.remove(n);
} else {
this.propValues.put(n, (Object)bValue);
}
}
public boolean gb(int n) {
return ((BBoolean)this.g(n)).getBoolean();
}
public int gi(int n) {
return ((BInteger)this.g(n)).getInt();
}
public long gj(int n) {
return ((BLong)this.g(n)).getLong();
}
public float gf(int n) {
return ((BFloat)this.g(n)).getFloat();
}
public double gd(int n) {
return ((BDouble)this.g(n)).getDouble();
}
public String gs(int n) {
return ((BString)this.g(n)).getString();
}
public void sb(int n, boolean bl) {
this.s(n, BBoolean.make(bl));
}
public void si(int n, int n2) {
this.s(n, BInteger.make(n2));
}
public void sj(int n, long l) {
this.s(n, BLong.make(l));
}
public void sf(int n, float f) {
this.s(n, BFloat.make(f));
}
public void sd(int n, double d) {
this.s(n, BDouble.make(d));
}
public void ss(int n, String string) {
this.s(n, BString.make(string));
}
public BValue invoke(int n, BComponent bComponent, BValue bValue, Context context) {
Action action = this.getType().slots[n].asAction();
return ((NSyntheticAction)action).invoke(n, bComponent, bValue, context);
}
private final /* synthetic */ void this() {
this.propValues = new IntHashMap();
this.propFlags = new IntHashMap();
}
public SyntheticComponentSlotMap() {
this.this();
}
}
@@ -0,0 +1,104 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* javax.baja.xml.XElem
* javax.baja.xml.XParser
*/
package com.tridium.sys.schema;
import com.tridium.sys.Nre;
import com.tridium.sys.module.NModule;
import com.tridium.sys.schema.EnumIntrospector;
import com.tridium.sys.schema.EnumType;
import com.tridium.sys.schema.SyntheticEnumType;
import java.io.BufferedInputStream;
import java.io.InputStream;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Modifier;
import javax.baja.sys.BFrozenEnum;
import javax.baja.sys.BajaRuntimeException;
import javax.baja.sys.ModuleException;
import javax.baja.sys.Type;
import javax.baja.xml.XElem;
import javax.baja.xml.XParser;
public class SyntheticEnumIntrospector
extends EnumIntrospector {
Type introspect() throws Exception {
int n = this.cls.getModifiers();
if (!Modifier.isFinal(n) && !Modifier.isAbstract(n)) {
throw this.err("BFrozenEnum subclasses must be declared final or abstract");
}
this.mapEnums();
int[] nArray = new int[this.count];
System.arraycopy(this.ordinals, 0, nArray, 0, this.count);
return new SyntheticEnumType(this, this.def, nArray, this.byOrdinal, this.byTag, this.cls);
}
protected void mapEnums() throws Exception {
NModule nModule = Nre.moduleManager.getModuleForClass(this.cls);
if (nModule.jarFile != null) {
XElem[] xElemArray = nModule.jarFile.getJarEntry("META-INF/module.xml");
if (xElemArray == null) {
xElemArray = nModule.jarFile.getJarEntry("meta-inf/module.xml");
}
if (xElemArray == null) {
throw new ModuleException("Module missing META-INF/module.xml: " + nModule.jarFile.getFile());
}
XElem xElem = XParser.make((InputStream)new BufferedInputStream(xElemArray.getInputStream())).parse();
if (xElem.elem("types") != null) {
xElemArray = xElem.elem("types").elems("type");
int n = 0;
while (n < xElemArray.length) {
XElem xElem2;
if (xElemArray[n].get("name").equals(this.typeName) && (xElem2 = xElemArray[n].elem("entries")) != null) {
XElem[] xElemArray2 = xElem2.elems("entry");
int n2 = 0;
while (n2 < xElemArray2.length) {
BFrozenEnum bFrozenEnum;
Object object;
String string = xElemArray2[n2].get("name");
int n3 = xElemArray2[n2].geti("ordinal");
this.ordinals[this.count++] = n3;
if (this.byOrdinal.get(n3) != null) {
throw this.err("Duplicate ordinal " + n3);
}
try {
object = this.cls.getConstructor(Integer.TYPE);
bFrozenEnum = (BFrozenEnum)((Constructor)object).newInstance(new Integer(n3));
}
catch (NoSuchMethodException noSuchMethodException) {
throw new BajaRuntimeException("Missing enumeration constructor.", noSuchMethodException);
}
catch (InvocationTargetException invocationTargetException) {
throw new BajaRuntimeException("Unable to create enumeration instance.", invocationTargetException);
}
catch (IllegalAccessException illegalAccessException) {
throw new BajaRuntimeException("Unable to create enumeration instance.", illegalAccessException);
}
catch (InstantiationException instantiationException) {
throw new BajaRuntimeException("Unable to create enumeration instance.", instantiationException);
}
if (this.def == null) {
this.def = bFrozenEnum;
}
object = new EnumType.Entry(n3, string, bFrozenEnum);
this.byOrdinal.put(n3, object);
this.byTag.put(string, object);
++n2;
}
break;
}
++n;
}
}
}
}
public SyntheticEnumIntrospector(int n, Class clazz) {
super(n, clazz);
}
}
@@ -0,0 +1,76 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* javax.baja.nre.util.IntHashMap
*/
package com.tridium.sys.schema;
import com.tridium.sys.module.NModule;
import com.tridium.sys.schema.EnumIntrospector;
import com.tridium.sys.schema.EnumType;
import com.tridium.util.ArrayUtil;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.HashMap;
import javax.baja.nre.util.IntHashMap;
import javax.baja.registry.TypeInfo;
import javax.baja.sys.BFrozenEnum;
import javax.baja.sys.BajaRuntimeException;
public class SyntheticEnumType
extends EnumType {
Class typeClass;
public void setTypeInfo(TypeInfo typeInfo) {
this.typeInfo = typeInfo;
}
public boolean isTransient() {
boolean bl = false;
if (((NModule)this.getModule().fw(405)).getZipFile() == null) {
bl = true;
}
return bl;
}
public void addEntry(int n, String string) {
BFrozenEnum bFrozenEnum;
Object object;
this.ordinals = ArrayUtil.addOne(this.ordinals, n);
if (this.byTag.containsKey(string)) {
throw new IllegalArgumentException("Tag already defined within enumeration.");
}
if (this.byOrdinal.containsKey(n)) {
throw new IllegalArgumentException("Tag already defined within enumeration.");
}
try {
object = this.typeClass.getConstructor(Integer.TYPE);
bFrozenEnum = (BFrozenEnum)((Constructor)object).newInstance(new Integer(n));
}
catch (NoSuchMethodException noSuchMethodException) {
throw new BajaRuntimeException("Missing enumeration constructor.", noSuchMethodException);
}
catch (InvocationTargetException invocationTargetException) {
throw new BajaRuntimeException("Unable to create enumeration instance.", invocationTargetException);
}
catch (IllegalAccessException illegalAccessException) {
throw new BajaRuntimeException("Unable to create enumeration instance.", illegalAccessException);
}
catch (InstantiationException instantiationException) {
throw new BajaRuntimeException("Unable to create enumeration instance.", instantiationException);
}
if (this.defaultInstance == null) {
this.defaultInstance = bFrozenEnum;
}
object = new EnumType.Entry(n, string, bFrozenEnum);
this.byOrdinal.put(n, object);
this.byTag.put(string, object);
}
public SyntheticEnumType(EnumIntrospector enumIntrospector, BFrozenEnum bFrozenEnum, int[] nArray, IntHashMap intHashMap, HashMap hashMap, Class clazz) {
super(enumIntrospector, bFrozenEnum, nArray, intHashMap, hashMap);
this.typeClass = clazz;
}
}
@@ -0,0 +1,25 @@
/*
* Decompiled with CFR 0.152.
*/
package com.tridium.sys.schema;
import com.tridium.sys.schema.SimpleIntrospector;
import com.tridium.sys.schema.SyntheticSimpleType;
import java.lang.reflect.Modifier;
import javax.baja.sys.BSimple;
import javax.baja.sys.Type;
public class SyntheticSimpleIntrospector
extends SimpleIntrospector {
Type introspect() throws Exception {
if (!this.isAbstract && !Modifier.isFinal(this.cls.getModifiers())) {
throw this.err("Concrete BSimples must be declared final");
}
return new SyntheticSimpleType(this, (BSimple)this.getConstantFieldObject("DEFAULT"), SyntheticSimpleIntrospector.getDataTypeSymbol(this.cls));
}
public SyntheticSimpleIntrospector(int n, Class clazz) {
super(n, clazz);
}
}
@@ -0,0 +1,30 @@
/*
* Decompiled with CFR 0.152.
*/
package com.tridium.sys.schema;
import com.tridium.sys.module.NModule;
import com.tridium.sys.schema.SimpleIntrospector;
import com.tridium.sys.schema.SimpleType;
import javax.baja.registry.TypeInfo;
import javax.baja.sys.BSimple;
public class SyntheticSimpleType
extends SimpleType {
public void setTypeInfo(TypeInfo typeInfo) {
this.typeInfo = typeInfo;
}
public boolean isTransient() {
boolean bl = false;
if (((NModule)this.getModule().fw(405)).getZipFile() == null) {
bl = true;
}
return bl;
}
public SyntheticSimpleType(SimpleIntrospector simpleIntrospector, BSimple bSimple, char c) {
super(simpleIntrospector, bSimple, c);
}
}
@@ -0,0 +1,130 @@
/*
* Decompiled with CFR 0.152.
*/
package com.tridium.sys.schema;
import com.tridium.sys.schema.DynamicTable;
import com.tridium.sys.schema.NTopic;
import javax.baja.sys.Action;
import javax.baja.sys.BComplex;
import javax.baja.sys.BObject;
import javax.baja.sys.Context;
import javax.baja.sys.CursorException;
import javax.baja.sys.Property;
import javax.baja.sys.Slot;
import javax.baja.sys.SlotCursor;
import javax.baja.sys.Topic;
final class TopicCursor
implements SlotCursor {
private int index = -1;
private BComplex object;
private NTopic[] frozen;
private DynamicTable dynamic;
public final BObject target() {
return this.object;
}
public final Context getContext() {
return null;
}
/*
* Unable to fully structure code
*/
public final boolean next() {
if (++this.index < this.frozen.length) {
return true;
}
if (this.dynamic != null) ** GOTO lbl8
return false;
lbl-1000:
// 1 sources
{
if (this.dynamic.slots[this.index - this.frozen.length].isTopic()) {
return true;
}
++this.index;
lbl8:
// 2 sources
** while (this.index - this.frozen.length < this.dynamic.count)
}
lbl9:
// 1 sources
return false;
}
public final boolean nextObject() {
throw new CursorException("Only for iterating through properties");
}
public final boolean nextComponent() {
throw new CursorException("Only for iterating through properties");
}
public final boolean next(Class clazz) {
throw new CursorException("Only for iterating through properties");
}
public final Slot slot() {
if (this.index < this.frozen.length) {
return this.frozen[this.index];
}
return this.dynamic.slots[this.index - this.frozen.length];
}
public final Topic topic() {
return this.slot().asTopic();
}
public final Property property() {
throw new CursorException("not property");
}
public final int getTypeAccess() {
throw new CursorException("not property");
}
public final BObject get() {
throw new CursorException("not property");
}
public final boolean getBoolean() {
throw new CursorException("not property");
}
public final int getInt() {
throw new CursorException("not property");
}
public final long getLong() {
throw new CursorException("not property");
}
public final float getFloat() {
throw new CursorException("not property");
}
public final double getDouble() {
throw new CursorException("not property");
}
public final String getString() {
throw new CursorException("not property");
}
public final Action action() {
throw new CursorException("not action");
}
TopicCursor(BComplex bComplex, NTopic[] nTopicArray, DynamicTable dynamicTable) {
this.object = bComplex;
this.frozen = nTopicArray;
this.dynamic = dynamicTable;
}
}
@@ -0,0 +1,9 @@
/*
* Decompiled with CFR 0.152.
*/
package com.tridium.sys.schema;
public class UnhandledSlotException
extends RuntimeException {
}
@@ -0,0 +1,62 @@
/*
* Decompiled with CFR 0.152.
*/
package com.tridium.sys.schema;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class Utils {
static /* synthetic */ Class class$java$lang$String;
static /* synthetic */ Class class$javax$baja$sys$BObject;
public static int getTypeAccess(Class clazz) {
if (clazz.isPrimitive()) {
if (clazz == Boolean.TYPE) {
return 0;
}
if (clazz == Integer.TYPE) {
return 2;
}
if (clazz == Long.TYPE) {
return 3;
}
if (clazz == Float.TYPE) {
return 4;
}
if (clazz == Double.TYPE) {
return 5;
}
return -1;
}
Class clazz2 = class$java$lang$String;
if (clazz2 == null) {
clazz2 = class$java$lang$String = Utils.class("[Ljava.lang.String;", false);
}
if (clazz == clazz2) {
return 6;
}
Class clazz3 = class$javax$baja$sys$BObject;
if (clazz3 == null) {
clazz3 = class$javax$baja$sys$BObject = Utils.class("[Ljavax.baja.sys.BObject;", false);
}
if (clazz3.isAssignableFrom(clazz)) {
return 7;
}
return -1;
}
static /* synthetic */ Class class(String string, boolean bl) {
try {
Class<?> clazz = Class.forName(string);
if (!bl) {
clazz = clazz.getComponentType();
}
return clazz;
}
catch (ClassNotFoundException classNotFoundException) {
throw new NoClassDefFoundError(classNotFoundException.getMessage());
}
}
}