Package org.openqa.selenium.grid.config
Class AnnotatedConfig
- java.lang.Object
-
- org.openqa.selenium.grid.config.AnnotatedConfig
-
- All Implemented Interfaces:
Config
public class AnnotatedConfig extends java.lang.Object implements Config
A form ofConfig
that is generated by looking at fields in the constructor arg that are annotated withConfigValue
. The class hierarchy is walked from closest to Object to the constructor argument's type, null values are ignored, and the order in which fields are read is not stable (meaning duplicate config values may give different values each time).The main use of this class is to allow an object configured using (for example) jcommander to be used directly within the app, without requiring intermediate support classes to transform flags to config values.
-
-
Constructor Summary
Constructors Constructor Description AnnotatedConfig(java.lang.Object obj)
AnnotatedConfig(java.lang.Object obj, java.util.Set<java.lang.String> cliArgs, boolean includeCliArgs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<java.util.List<java.lang.String>>
getAll(java.lang.String section, java.lang.String option)
java.util.Set<java.lang.String>
getOptions(java.lang.String section)
java.util.Set<java.lang.String>
getSectionNames()
-
-
-
Method Detail
-
getAll
public java.util.Optional<java.util.List<java.lang.String>> getAll(java.lang.String section, java.lang.String option)
-
getSectionNames
public java.util.Set<java.lang.String> getSectionNames()
- Specified by:
getSectionNames
in interfaceConfig
-
getOptions
public java.util.Set<java.lang.String> getOptions(java.lang.String section)
- Specified by:
getOptions
in interfaceConfig
-
-