/** * Returns a list of all available components in this instance * of <code>ComponentManager</code>. * @return the components A list of component classes available in this * instance of <code>ComponentManager</code>. */ public SortedSet<String> getComponentStrings() { SortedSet<String> result = getComponents().stream() .map(AnnComponentManager::getShortName) .collect(Collectors.toCollection(TreeSet::new)); return result; }
for (Class<?> comp : cm.getComponents()) { StringBuilder sc = new StringBuilder(); if (!componentsDone.contains(comp)) {
public static void main(String[] args) { ClassPool cp = ClassPool.getDefault(); for (Class<? extends Component> c : cm.getComponents()) { startClass(c); Map<String, List<Field>> fields = new TreeMap<>();
/** * Checks whether all components implement the getName() method. While it * cannot be enforced to implement a static method, it should be done (e.g. * to be used as label for the component in GUIs). */ @Test public void nameTest() { AnnComponentManager cm = AnnComponentManager.getInstance(); Collection<Class<? extends Component>> components = cm.getComponents(); for (Class<? extends Component> component : components) { AnnComponentManager.getName(component); } }