AnnotationProcessor { public Collection<Node<?>> getDependencies(Class<?> pluginClass) { final Constructor<?>[] constructors = pluginClass.getConstructors(); if (constructors.length == 0) { throw new IllegalArgumentException(String.format("Class %s doesn't have a public constructor. Class: %s", pluginClass.getSimpleName(), pluginClass.getName())); } for (Constructor<?> constructor : constructors) { final Inject annotation = constructor.getAnnotation(Inject.class); if (annotation == null) { continue; } final Collection<Node<?>> dependencies = new ArrayList<>(); final Class<?>[] parameterTypes = constructor.getParameterTypes(); for (final Class<?> param : parameterTypes) { dependencies.add(new Node<>(param)); } return dependencies; } return new ArrayList<>(); }  static String getPluginName(T plugin); static String getPluginName(Class<T> plugin); boolean hasDependencies(Class<?> pluginClass); Collection<Node<?>> getDependencies(Class<?> pluginClass);  }
@Test public void shouldRetrieveDependencies() { final Collection<Node<?>> dependencies = sut.getDependencies(DependencyPlugin.class); assertFalse(dependencies.isEmpty()); }