@Test public void canGetConfigTarget() { Class<CameraX> configTarget = mAppConfig.getTargetClass( null); assertThat(configTarget).isEqualTo(CameraX.class); }
@RestrictTo(Scope.LIBRARY_GROUP) @Override @Nullable public Class<CameraX> getTargetClass( @Nullable Class<CameraX> valueIfMissing) { @SuppressWarnings("unchecked") Class<CameraX> storedClass = (Class<CameraX>) retrieveOption( OPTION_TARGET_CLASS, valueIfMissing); return storedClass; }
AppConfig implements TargetConfig<CameraX>, Config { @RestrictTo(Scope.LIBRARY_GROUP) @Override @Nullable public Class<CameraX> getTargetClass( @Nullable Class<CameraX> valueIfMissing) { @SuppressWarnings("unchecked") Class<CameraX> storedClass = (Class<CameraX>) retrieveOption( OPTION_TARGET_CLASS, valueIfMissing); return storedClass; } }
AppConfig implements TargetConfig<CameraX>, Config { @RestrictTo(Scope.LIBRARY_GROUP) @Override @Nullable public Class<CameraX> getTargetClass( @Nullable Class<CameraX> valueIfMissing) { @SuppressWarnings("unchecked") Class<CameraX> storedClass = (Class<CameraX>) retrieveOption( OPTION_TARGET_CLASS, valueIfMissing); return storedClass; } AppConfig(OptionsBundle options); }
AppConfig implements TargetConfig<CameraX>, Config { @RestrictTo(Scope.LIBRARY_GROUP) @Override @Nullable public Class<CameraX> getTargetClass( @Nullable Class<CameraX> valueIfMissing) { @SuppressWarnings("unchecked") Class<CameraX> storedClass = (Class<CameraX>) retrieveOption( OPTION_TARGET_CLASS, valueIfMissing); return storedClass; } AppConfig(OptionsBundle options); @RestrictTo(Scope.LIBRARY_GROUP) CameraFactory getCameraFactory(@Nullable CameraFactory valueIfMissing); @RestrictTo(Scope.LIBRARY_GROUP) CameraDeviceSurfaceManager getDeviceSurfaceManager(
            @Nullable CameraDeviceSurfaceManager valueIfMissing); @RestrictTo(Scope.LIBRARY_GROUP) UseCaseConfigFactory getUseCaseConfigRepository(
            @Nullable UseCaseConfigFactory valueIfMissing); @RestrictTo(Scope.LIBRARY_GROUP) @Override boolean containsOption(Option<?> id); @RestrictTo(Scope.LIBRARY_GROUP) @Override @Nullable ValueT retrieveOption(Option<ValueT> id); @RestrictTo(Scope.LIBRARY_GROUP) @Override @Nullable ValueT retrieveOption(Option<ValueT> id, @Nullable ValueT valueIfMissing); @RestrictTo(Scope.LIBRARY_GROUP) @Override void findOptions(String idStem, OptionMatcher matcher); @RestrictTo(Scope.LIBRARY_GROUP) @Override Set<Option<?>> listOptions(); @RestrictTo(Scope.LIBRARY_GROUP) @Override @Nullable Class<CameraX> getTargetClass(
            @Nullable Class<CameraX> valueIfMissing); @RestrictTo(Scope.LIBRARY_GROUP) @Override Class<CameraX> getTargetClass(); @RestrictTo(Scope.LIBRARY_GROUP) @Override @Nullable String getTargetName(@Nullable String valueIfMissing); @RestrictTo(Scope.LIBRARY_GROUP) @Override String getTargetName(); }
AppConfig implements TargetConfig<CameraX>, Config { @RestrictTo(Scope.LIBRARY_GROUP) @Override @Nullable public Class<CameraX> getTargetClass( @Nullable Class<CameraX> valueIfMissing) { @SuppressWarnings("unchecked") Class<CameraX> storedClass = (Class<CameraX>) retrieveOption( OPTION_TARGET_CLASS, valueIfMissing); return storedClass; } AppConfig(OptionsBundle options); @RestrictTo(Scope.LIBRARY_GROUP) CameraFactory getCameraFactory(@Nullable CameraFactory valueIfMissing); @RestrictTo(Scope.LIBRARY_GROUP) CameraDeviceSurfaceManager getDeviceSurfaceManager(
            @Nullable CameraDeviceSurfaceManager valueIfMissing); @RestrictTo(Scope.LIBRARY_GROUP) UseCaseConfigFactory getUseCaseConfigRepository(
            @Nullable UseCaseConfigFactory valueIfMissing); @RestrictTo(Scope.LIBRARY_GROUP) @Override boolean containsOption(Option<?> id); @RestrictTo(Scope.LIBRARY_GROUP) @Override @Nullable ValueT retrieveOption(Option<ValueT> id); @RestrictTo(Scope.LIBRARY_GROUP) @Override @Nullable ValueT retrieveOption(Option<ValueT> id, @Nullable ValueT valueIfMissing); @RestrictTo(Scope.LIBRARY_GROUP) @Override void findOptions(String idStem, OptionMatcher matcher); @RestrictTo(Scope.LIBRARY_GROUP) @Override Set<Option<?>> listOptions(); @RestrictTo(Scope.LIBRARY_GROUP) @Override @Nullable Class<CameraX> getTargetClass(
            @Nullable Class<CameraX> valueIfMissing); @RestrictTo(Scope.LIBRARY_GROUP) @Override Class<CameraX> getTargetClass(); @RestrictTo(Scope.LIBRARY_GROUP) @Override @Nullable String getTargetName(@Nullable String valueIfMissing); @RestrictTo(Scope.LIBRARY_GROUP) @Override String getTargetName();  }