/* * Decompiled with CFR 0.152. */ package javax.baja.sys; import com.tridium.sys.module.BModuleTypesContainer; import com.tridium.sys.module.NModule; import java.net.URL; import javax.baja.file.BIFile; import javax.baja.file.FilePath; import javax.baja.file.zip.BZipSpace; import javax.baja.naming.BHost; import javax.baja.naming.BISession; import javax.baja.naming.BOrd; import javax.baja.nav.BINavNode; import javax.baja.registry.ModuleInfo; import javax.baja.sys.BIcon; import javax.baja.sys.BModuleSpace; import javax.baja.sys.Context; import javax.baja.sys.ModuleIncompatibleException; import javax.baja.sys.Sys; import javax.baja.sys.Type; import javax.baja.sys.TypeException; import javax.baja.sys.TypeNotFoundException; import javax.baja.util.Lexicon; import javax.baja.util.Version; /* * Illegal identifiers - consider using --renameillegalidents true */ public final class BModule extends BZipSpace { public static final Type TYPE; private static final BIcon icon; private static final BIcon synthIcon; private NModule module; static /* synthetic */ Class class$javax$baja$sys$BModule; public final Type getType() { return TYPE; } public final BHost getHost() { return BModuleSpace.INSTANCE.getHost(); } public final BISession getSession() { return BModuleSpace.INSTANCE.getSession(); } protected final BOrd appendFilePathToOrd(BOrd bOrd, FilePath filePath) { if (bOrd == null) { return null; } if (bOrd.toString().length() == 0) { return BOrd.make(filePath); } return BOrd.make(bOrd.toString() + filePath.getBody()); } public final BINavNode getNavParent() { return BModuleSpace.INSTANCE; } public final BINavNode getNavChild(String string) { if (string.equalsIgnoreCase("types")) { return BModuleTypesContainer.get(this); } return super.getNavChild(string); } public final BINavNode[] getNavChildren() { BIFile[] bIFileArray = this.listFiles(); BINavNode[] bINavNodeArray = new BINavNode[bIFileArray.length + 1]; System.arraycopy(bIFileArray, 0, bINavNodeArray, 1, bIFileArray.length); bINavNodeArray[0] = BModuleTypesContainer.get(this); return bINavNodeArray; } public final String getModuleName() { return this.module.getModuleName(); } public final String getPreferredSymbol() { return this.module.getPreferredSymbol(); } public final Version getBajaVersion() { return this.module.getBajaVersion(); } public final String getVendor() { return this.module.getVendor(); } public final Version getVendorVersion() { return this.module.getVendorVersion(); } public final BModule checkBajaVersion(Version version) throws ModuleIncompatibleException { this.module.checkBajaVersion(version); return this; } public final BModule checkVendor(String string, Version version) throws ModuleIncompatibleException { this.module.checkVendor(string, version); return this; } public final String getDescription() { return this.module.getDescription(); } public final ModuleInfo getModuleInfo() { return Sys.getRegistry().getModule(this.getModuleName()); } public final Type getType(String string) throws TypeNotFoundException, TypeException { return this.module.getType(string); } public final Class loadClass(String string) throws ClassNotFoundException { return this.module.loadClass(string); } public final URL getResource(String string) { return this.module.getResource(string); } public final Lexicon getLexicon() { return this.module.getLexicon(); } public final Lexicon getLexicon(String string) { return this.module.getLexicon(string); } public final boolean isSynthetic() { return this.module.isSynthetic(); } public final boolean isTransient() { return this.module.isTransient(); } public final String toString(Context context) { return "Module \"" + this.getModuleName() + "\" [" + this.getVendor() + ' ' + this.getVendorVersion() + "] " + this.module.getFile().length() / 1024L + "kb"; } public final Object fw(int n, Object object, Object object2, Object object3, Object object4) { if (n == 405) { return this.module; } return super.fw(n, object, object2, object3, object4); } public final BIcon getIcon() { return this.isSynthetic() ? synthIcon : 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()); } } public BModule(Object object) { super(BOrd.make("module://" + ((NModule)object).getModuleName()), ((NModule)object).getZipFile()); this.module = (NModule)object; } static { Class clazz = class$javax$baja$sys$BModule; if (clazz == null) { clazz = class$javax$baja$sys$BModule = BModule.class("[Ljavax.baja.sys.BModule;", false); } TYPE = Sys.loadType(clazz); icon = BIcon.std("module.png"); synthIcon = BIcon.make(BIcon.std("syntheticModule.png"), BIcon.std("badges/beaker.png")); } }