2026-03-17 13:31:18 -07:00

50 lines
1.5 KiB
Java

/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* javax.baja.nre.util.TextUtil
*/
package com.tridium.sys.registry;
import javax.baja.nre.util.TextUtil;
import javax.baja.registry.TypeInfo;
import javax.baja.sys.Sys;
public class RegTool {
public static void main(String[] stringArray) {
if (stringArray.length == 0) {
RegTool.println("RegTool <cmd>:");
RegTool.println(" types <t> List types which extent t");
return;
}
String string = stringArray[0];
if (string.equals("types")) {
RegTool.types(stringArray[1]);
}
}
public static void types(String string) {
TypeInfo typeInfo = Sys.getRegistry().getType(string);
TypeInfo[] typeInfoArray = Sys.getRegistry().getTypes(typeInfo);
System.out.println("Types: " + typeInfo);
int n = 0;
while (n < typeInfoArray.length) {
TypeInfo typeInfo2 = typeInfoArray[n];
if (!typeInfo2.isAbstract()) {
System.out.print(" " + TextUtil.padRight((String)typeInfo2.toString(), (int)50));
try {
System.out.print(" " + typeInfo2.getAgentInfo().getRequiredPermissions());
}
catch (Exception exception) {}
System.out.println();
}
++n;
}
}
public static void println(String string) {
System.out.println(string);
}
}