117 lines
3.1 KiB
Java
117 lines
3.1 KiB
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*/
|
|
package javax.baja.sys;
|
|
|
|
import com.tridium.sys.module.BModuleNavNode;
|
|
import javax.baja.naming.BLocalHost;
|
|
import javax.baja.naming.BOrd;
|
|
import javax.baja.nav.BINavNode;
|
|
import javax.baja.registry.ModuleInfo;
|
|
import javax.baja.space.BSpace;
|
|
import javax.baja.sys.BIcon;
|
|
import javax.baja.sys.Sys;
|
|
import javax.baja.sys.Type;
|
|
import javax.baja.util.LexiconText;
|
|
|
|
/*
|
|
* Illegal identifiers - consider using --renameillegalidents true
|
|
*/
|
|
public class BModuleSpace
|
|
extends BSpace {
|
|
public static final Type TYPE;
|
|
public static final BModuleSpace INSTANCE;
|
|
private static final BIcon icon;
|
|
private BOrd ordInSession;
|
|
private Object loadLock;
|
|
private boolean loaded;
|
|
static /* synthetic */ Class class$javax$baja$sys$BModuleSpace;
|
|
|
|
public Type getType() {
|
|
return TYPE;
|
|
}
|
|
|
|
public BOrd getOrdInSession() {
|
|
return this.ordInSession;
|
|
}
|
|
|
|
public boolean hasNavChildren() {
|
|
return true;
|
|
}
|
|
|
|
public BINavNode getNavChild(String string) {
|
|
this.lazyLoad();
|
|
return super.getNavChild(string);
|
|
}
|
|
|
|
public BINavNode[] getNavChildren() {
|
|
this.lazyLoad();
|
|
return super.getNavChildren();
|
|
}
|
|
|
|
/*
|
|
* WARNING - Removed try catching itself - possible behaviour change.
|
|
* Enabled aggressive block sorting
|
|
* Enabled unnecessary exception pruning
|
|
* Enabled aggressive exception aggregation
|
|
*/
|
|
public void lazyLoad() {
|
|
if (this.loaded) {
|
|
return;
|
|
}
|
|
Object object = this.loadLock;
|
|
synchronized (object) {
|
|
if (this.loaded) {
|
|
return;
|
|
}
|
|
this.loaded = true;
|
|
ModuleInfo[] moduleInfoArray = Sys.getRegistry().getModules();
|
|
int n = 0;
|
|
while (n < moduleInfoArray.length) {
|
|
this.addNavChild(new BModuleNavNode(moduleInfoArray[n]));
|
|
++n;
|
|
}
|
|
return;
|
|
}
|
|
}
|
|
|
|
public BIcon getIcon() {
|
|
return icon;
|
|
}
|
|
|
|
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.ordInSession = BOrd.make("module:");
|
|
this.loadLock = new Object();
|
|
}
|
|
|
|
private BModuleSpace() {
|
|
super("modules", LexiconText.make("baja", "nav.modules"));
|
|
this.this();
|
|
}
|
|
|
|
static {
|
|
Class clazz = class$javax$baja$sys$BModuleSpace;
|
|
if (clazz == null) {
|
|
clazz = class$javax$baja$sys$BModuleSpace = BModuleSpace.class("[Ljavax.baja.sys.BModuleSpace;", false);
|
|
}
|
|
TYPE = Sys.loadType(clazz);
|
|
INSTANCE = new BModuleSpace();
|
|
BLocalHost.INSTANCE.addNavChild(INSTANCE);
|
|
icon = BIcon.std("modules.png");
|
|
}
|
|
}
|
|
|