java.lang.Object
org.htmlunit.corejs.javascript.config.RhinoConfig
RhinoConfig provides typesafe and static access methods to a
RhinoProperties default
instance.
Note: Reading a config value only once is a good practice to avoid affecting performance. For example:
private static final boolean XYZ_ENABLED = RhinoConfig.get("rhino.xyz.enabled", false);
- Author:
- Roland Praml, Foconis Analytics GmbH
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
RhinoConfig
public RhinoConfig()
-
-
Method Details
-
get
Returns the property as string with null as default. -
get
Returns the property as enum.If the property is set to any of the enum names (case-insensitive), this enum value is returned, otherwise
defaultValueis returned.Note:
defaultValuemust be specified to derive the enum class and its values. -
get
Returns the property as boolean.A property is true, if it is either
Boolean.TRUEor if and only if the string representation is equal to"true"(case-insensitive). If the property is not set,defaultValueis returnedSame behaviour as
Boolean.getBoolean(String) -
get
Returns the property as integer.if the property is not set or not a valid integer value,
defaultValueis returned.
-