| // This file is autogenerated by | |
| // base/android/java_flag_generator/java_flag_generator.py | |
| // From | |
| // //chrome/flags/test_feature_list.cc | |
| // DO NOT EDIT. | |
| package org.chromium.foo; | |
| import org.chromium.build.annotations.NullMarked; | |
| /** | |
| * Typed accessors for the features in kFeaturesExposedToJava and the params in | |
| * k*ParamsExposedToJava. | |
| */ | |
| @NullMarked | |
| public final class SampleFeatures { | |
| static boolean isFeatureEnabled(String featureName) { | |
| return SampleFeatureMap.getInstance().isEnabledInNative(featureName); | |
| } | |
| static boolean getParamValueAsBoolean(String featureName, String paramName) { | |
| return SampleFeatureMap.getInstance().getParamValueAsBoolean(featureName, paramName); | |
| } | |
| static int getParamValueAsInt(String featureName, String paramName) { | |
| return SampleFeatureMap.getInstance().getParamValueAsInt(featureName, paramName); | |
| } | |
| static double getParamValueAsDouble(String featureName, String paramName) { | |
| return SampleFeatureMap.getInstance().getParamValueAsDouble(featureName, paramName); | |
| } | |
| static String getParamValueAsString(String featureName, String paramName) { | |
| return SampleFeatureMap.getInstance().getParamValueAsString(featureName, paramName); | |
| } | |
| /** {@code foo::kExposedFeature} */ | |
| public static final class ExposedFeature { | |
| public static final String NAME = "ExposedFeatureName"; | |
| public static boolean isEnabled() { | |
| return isFeatureEnabled(NAME); | |
| } | |
| } | |
| /** {@code foo::kDerivedName} */ | |
| public static final class DerivedName { | |
| public static final String NAME = "DerivedName"; | |
| public static boolean getValue() { | |
| return getParamValueAsBoolean(ExposedFeature.NAME, NAME); | |
| } | |
| } | |
| /** {@code foo::kOfNotExposedFeature} */ | |
| public static final class OfNotExposedFeature { | |
| public static final String NAME = "OfNotExposedFeature"; | |
| public static int getValue() { | |
| return getParamValueAsInt("NotExposedFeatureName", NAME); | |
| } | |
| } | |
| /** {@code foo::kCustomName} */ | |
| public static final class CustomName { | |
| public static final String NAME = "custom_name"; | |
| public static int getValue() { | |
| return getParamValueAsInt(ExposedFeature.NAME, NAME); | |
| } | |
| } | |
| /** {@code foo::kPlatformDependentDefault} */ | |
| public static final class PlatformDependentDefault { | |
| public static final String NAME = "size"; | |
| public static int getValue() { | |
| return getParamValueAsInt(ExposedFeature.NAME, NAME); | |
| } | |
| } | |
| /** {@code foo::kDefinedTwice} */ | |
| public static final class DefinedTwice { | |
| public static final String NAME = "twice"; | |
| public static int getValue() { | |
| return getParamValueAsInt(ExposedFeature.NAME, NAME); | |
| } | |
| } | |
| /** {@code foo::kDoubleParam} */ | |
| public static final class DoubleParam { | |
| public static final String NAME = "ratio"; | |
| public static double getValue() { | |
| return getParamValueAsDouble(ExposedFeature.NAME, NAME); | |
| } | |
| } | |
| /** {@code foo::kStringParam} */ | |
| public static final class StringParam { | |
| public static final String NAME = "label"; | |
| public static String getValue() { | |
| return getParamValueAsString(ExposedFeature.NAME, NAME); | |
| } | |
| } | |
| } |