@@ -0,0 +1,982 @@
+package com.team254.lib.util;%0A%0Aimport java.lang.reflect.Field;%0Aimport java.util.ArrayList;%0Aimport java.util.Collection;%0A%0Apublic class Subsystem implements Tappable %7B%0A%09%0A%09String name;%0A%09public Subsystem(String name) %7B%0A%09%09this.name = name;%0A%09%09SystemManager.getInstance().add(this.getComponents());%0A%09%7D%0A%0A%09public final Collection%3CSerializable%3E getComponents() %7B%0A%09%09Field%5B%5D allFields = this.getClass().getDeclaredFields();%0A%09%09Collection%3CSerializable%3E components = new ArrayList%3CSerializable%3E();%0A%0A%09%09for (Field f : allFields) %7B%0A%09%09%09Serializable cur = null; %0A%09%09%09if (Serializable.class.isAssignableFrom(f.getClass())) %7B%0A%09%09%09%09Object obj = null;%0A%09%09%09%09try %7B%0A%09%09%09%09%09obj = f.get(this);%0A%09%09%09%09%7D catch (IllegalArgumentException %7C IllegalAccessException e) %7B%0A%09%09%09%09%09// TODO Auto-generated catch block%0A%09%09%09%09%09e.printStackTrace();%0A%09%09%09%09%7D%0A%09%09%09%09cur = (Serializable) obj;%0A%09%09%09%7D else %7B%0A%09%09%09%09cur = new SerialFieldContainer(name, f, this);%0A%09%09%09%7D%0A%09%09%09if (cur != null) %7B%0A%09%09%09%09components.add(cur);%0A%09%09%09%7D%09%0A%09%09%7D%0A%09%09return components;%0A%09%7D%0A%0A%7D%0A

Add serializable Subsytem base class