/* * 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(); } }