/* * Decompiled with CFR 0.152. * * Could not load the following classes: * javax.baja.nre.util.SortUtil */ package com.tridium.sys.spy; import java.io.IOException; import java.util.Enumeration; import javax.baja.nre.util.SortUtil; import javax.baja.spy.Spy; import javax.baja.spy.SpyWriter; public class SystemPropertiesSpy extends Spy { public void write(SpyWriter spyWriter) throws IOException { Object[] objectArray = new Pair[System.getProperties().size()]; Enumeration enumeration = System.getProperties().keys(); int n = 0; while (enumeration.hasMoreElements()) { Pair pair = new Pair(); pair.key = enumeration.nextElement().toString(); pair.value = System.getProperty(pair.key); objectArray[n] = pair; ++n; } SortUtil.sort((Object[])objectArray); spyWriter.startProps("System Properties"); n = 0; while (n < objectArray.length) { spyWriter.prop((Object)((Pair)objectArray[n]).key, ((Pair)objectArray[n]).value); ++n; } spyWriter.endProps(); } static class Pair implements Comparable { String key; String value; public int compareTo(Object object) { return this.key.compareTo(((Pair)object).key); } Pair() { } } }