@Test public void returnsEmptySetOfClassesNeverNull() throws Exception { assertTrue(everrestApplication.getClasses().isEmpty()); }
@Override public Set<Class<?>> getClasses() { Set<Class<?>> myClasses = new LinkedHashSet<>(this.classes); for (ObjectFactory<? extends ObjectModel> factory : getFactories()) { myClasses.add(factory.getObjectModel().getObjectClass()); } return myClasses; }
EverrestApplication extends Application { @Override public Set<Class<?>> getClasses() { Set<Class<?>> myClasses = new LinkedHashSet<>(this.classes); for (ObjectFactory<? extends ObjectModel> factory : getFactories()) { myClasses.add(factory.getObjectModel().getObjectClass()); } return myClasses; } }
EverrestApplication extends Application { @Override public Set<Class<?>> getClasses() { Set<Class<?>> myClasses = new LinkedHashSet<>(this.classes); for (ObjectFactory<? extends ObjectModel> factory : getFactories()) { myClasses.add(factory.getObjectModel().getObjectClass()); } return myClasses; } EverrestApplication(); }
EverrestApplication extends Application { @Override public Set<Class<?>> getClasses() { Set<Class<?>> myClasses = new LinkedHashSet<>(this.classes); for (ObjectFactory<? extends ObjectModel> factory : getFactories()) { myClasses.add(factory.getObjectModel().getObjectClass()); } return myClasses; } EverrestApplication(); void addClass(Class<?> clazz); void addSingleton(Object singleton); void addFactory(ObjectFactory<? extends ObjectModel> factory); void addResource(String uriPattern, Class<?> resourceClass); void addResource(String uriPattern, Object resource); Map<String, Class<?>> getResourceClasses(); Map<String, Object> getResourceSingletons(); Set<ObjectFactory<? extends ObjectModel>> getFactories(); @Override Set<Class<?>> getClasses(); @Override Set<Object> getSingletons(); void addApplication(Application application); }
EverrestApplication extends Application { @Override public Set<Class<?>> getClasses() { Set<Class<?>> myClasses = new LinkedHashSet<>(this.classes); for (ObjectFactory<? extends ObjectModel> factory : getFactories()) { myClasses.add(factory.getObjectModel().getObjectClass()); } return myClasses; } EverrestApplication(); void addClass(Class<?> clazz); void addSingleton(Object singleton); void addFactory(ObjectFactory<? extends ObjectModel> factory); void addResource(String uriPattern, Class<?> resourceClass); void addResource(String uriPattern, Object resource); Map<String, Class<?>> getResourceClasses(); Map<String, Object> getResourceSingletons(); Set<ObjectFactory<? extends ObjectModel>> getFactories(); @Override Set<Class<?>> getClasses(); @Override Set<Object> getSingletons(); void addApplication(Application application);  }