@Test public void testModelFactoryFindsResourceModel() { assertThat(this.testee.getModelDefinitions()) .hasSize(1); assertThat(this.testee.getModelDefinitions().iterator().next().getType()) .isSameAs(ModelClass.class); assertThat(this.testee.getModelDefinitions().iterator().next().getName()) .isEqualTo("modelClass"); assertThat(this.testee.getModelDefinitions().iterator().next().getResourceModel()) .isSameAs(ModelClass.class.getAnnotation(ResourceModel.class)); }
@Nonnull @Override public Collection<ModelDefinition<?>> getModelDefinitions() { return this.modelDefinitions; }
ModelFactory implements ResourceModelFactory { @Nonnull @Override public Collection<ModelDefinition<?>> getModelDefinitions() { return this.modelDefinitions; } }
ModelFactory implements ResourceModelFactory { @Nonnull @Override public Collection<ModelDefinition<?>> getModelDefinitions() { return this.modelDefinitions; } ModelFactory(Bundle bundle); }
ModelFactory implements ResourceModelFactory { @Nonnull @Override public Collection<ModelDefinition<?>> getModelDefinitions() { return this.modelDefinitions; } ModelFactory(Bundle bundle); @Nonnull @Override Collection<ModelDefinition<?>> getModelDefinitions(); @Override T provideModel(@Nonnull ModelDefinition<T> modelDefinition, @Nonnull ContentToModelMappingCallback<T> callback); }
ModelFactory implements ResourceModelFactory { @Nonnull @Override public Collection<ModelDefinition<?>> getModelDefinitions() { return this.modelDefinitions; } ModelFactory(Bundle bundle); @Nonnull @Override Collection<ModelDefinition<?>> getModelDefinitions(); @Override T provideModel(@Nonnull ModelDefinition<T> modelDefinition, @Nonnull ContentToModelMappingCallback<T> callback);  }