@Test public void testSortClasses() throws Exception { final AnnotationFinder finder = new AnnotationFinder(new ClassesArchive(Emerald.class)).link(); final List<Annotated<Class<?>>> classes = finder.findMetaAnnotatedClasses(Resource.class); assertTrue(classes.size() >= 3); final List<Annotated<Class<?>>> sorted = AnnotationDeployer.sortClasses(classes); assertTrue(sorted.size() >= 3); assertEquals(Emerald.class, sorted.get(0).get()); assertEquals(Green.class, sorted.get(1).get()); assertEquals(Color.class, sorted.get(2).get()); }
public static List<Annotated<Class<?>>> sortClasses(final List<Annotated<Class<?>>> list) { list.sort(new Comparator<Annotated<Class<?>>>() { @Override public int compare(final Annotated<Class<?>> o1, final Annotated<Class<?>> o2) { return compareClasses(o1.get(), o2.get()); } }); return list; }
AnnotationDeployer implements DynamicDeployer { public static List<Annotated<Class<?>>> sortClasses(final List<Annotated<Class<?>>> list) { list.sort(new Comparator<Annotated<Class<?>>>() { @Override public int compare(final Annotated<Class<?>> o1, final Annotated<Class<?>> o2) { return compareClasses(o1.get(), o2.get()); } }); return list; } }
AnnotationDeployer implements DynamicDeployer { public static List<Annotated<Class<?>>> sortClasses(final List<Annotated<Class<?>>> list) { list.sort(new Comparator<Annotated<Class<?>>>() { @Override public int compare(final Annotated<Class<?>> o1, final Annotated<Class<?>> o2) { return compareClasses(o1.get(), o2.get()); } }); return list; } AnnotationDeployer(); }
AnnotationDeployer implements DynamicDeployer { public static List<Annotated<Class<?>>> sortClasses(final List<Annotated<Class<?>>> list) { list.sort(new Comparator<Annotated<Class<?>>>() { @Override public int compare(final Annotated<Class<?>> o1, final Annotated<Class<?>> o2) { return compareClasses(o1.get(), o2.get()); } }); return list; } AnnotationDeployer(); AppModule deploy(AppModule appModule); void deploy(final CdiBeanInfo beanInfo); WebModule deploy(WebModule webModule); static DeploymentModule getModule(); static boolean isKnownEnvironmentEntryType(final Class type); static boolean isShareableJNDINamespace(final String jndiName); static void autoJpa(final EjbModule ejbModule); static void doAutoJpa(final IAnnotationFinder finder, final org.apache.openejb.jee.jpa.unit.PersistenceUnit pu); static List<Annotated<Class<?>>> sortClasses(final List<Annotated<Class<?>>> list); static List<Class<?>> sortClassesParentFirst(final List<Class<?>> list); static List<Annotated<Method>> sortMethods(final List<Annotated<Method>> list); static Collection<String> findRestClasses(final WebModule webModule, final IAnnotationFinder finder); static boolean isInstantiable(final Class<?> clazz); static URL classLocation(final Class clazz); EnvEntriesPropertiesDeployer getEnvEntriesPropertiesDeployer(); }
AnnotationDeployer implements DynamicDeployer { public static List<Annotated<Class<?>>> sortClasses(final List<Annotated<Class<?>>> list) { list.sort(new Comparator<Annotated<Class<?>>>() { @Override public int compare(final Annotated<Class<?>> o1, final Annotated<Class<?>> o2) { return compareClasses(o1.get(), o2.get()); } }); return list; } AnnotationDeployer(); AppModule deploy(AppModule appModule); void deploy(final CdiBeanInfo beanInfo); WebModule deploy(WebModule webModule); static DeploymentModule getModule(); static boolean isKnownEnvironmentEntryType(final Class type); static boolean isShareableJNDINamespace(final String jndiName); static void autoJpa(final EjbModule ejbModule); static void doAutoJpa(final IAnnotationFinder finder, final org.apache.openejb.jee.jpa.unit.PersistenceUnit pu); static List<Annotated<Class<?>>> sortClasses(final List<Annotated<Class<?>>> list); static List<Class<?>> sortClassesParentFirst(final List<Class<?>> list); static List<Annotated<Method>> sortMethods(final List<Annotated<Method>> list); static Collection<String> findRestClasses(final WebModule webModule, final IAnnotationFinder finder); static boolean isInstantiable(final Class<?> clazz); static URL classLocation(final Class clazz); EnvEntriesPropertiesDeployer getEnvEntriesPropertiesDeployer(); static final Logger logger; static final Logger startupLogger; static final String OPENEJB_JPA_AUTO_SCAN; static final String OPENEJB_JPA_AUTO_SCAN_PACKAGE; static final Set<String> knownResourceEnvTypes; static final Set<String> knownEnvironmentEntries; }