Package de.poiu.coat.example
Class ImmutableExampleConfig
- java.lang.Object
-
- de.poiu.coat.CoatConfig
-
- de.poiu.coat.example.ImmutableExampleConfig
-
- All Implemented Interfaces:
ExampleConfig
@Generated(value="de.poiu.coat.processor.CoatProcessor", date="2021-03-19T16:38:45.150037+01:00") public class ImmutableExampleConfig extends CoatConfig implements ExampleConfig
-
-
Constructor Summary
Constructors Constructor Description ImmutableExampleConfig(File file)ImmutableExampleConfig(Map<String,String> props)ImmutableExampleConfig(Properties props)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CharsetcharsetWithDefault()The charset to use.StringmandatoryString()This is a mandatory string that must be specified in the config file.Optional<InetAddress>optionalInetAddress()An InetAddress that may be specified.OptionalIntoptionalInt()An optional int that may be specified, but may also be left off.-
Methods inherited from class de.poiu.coat.CoatConfig
get, get, getBoolean, getBooleanOrDefault, getInt, getIntOrDefault, getOptional, getOptionalInt, getOptionalIntOrDefault, getOptionalOrDefault, getOptionalString, getOptionalStringOrDefault, getOrDefault, getString, getStringOrDefault, registerConverter, toString, validate
-
-
-
-
Constructor Detail
-
ImmutableExampleConfig
public ImmutableExampleConfig(File file) throws IOException
- Throws:
IOException
-
ImmutableExampleConfig
public ImmutableExampleConfig(Properties props)
-
-
Method Detail
-
mandatoryString
public String mandatoryString()
This is a mandatory string that must be specified in the config file.The application will not start without it.
- Specified by:
mandatoryStringin interfaceExampleConfig- Returns:
- the config value for mandatorString
-
optionalInt
public OptionalInt optionalInt()
An optional int that may be specified, but may also be left off.The application can run without it.3 Und hier ist das @mittendrin enthalten.
- Specified by:
optionalIntin interfaceExampleConfig- Returns:
- the config value for optionalInt
-
charsetWithDefault
public Charset charsetWithDefault()
The charset to use. If not specified it defaults to UTF-8.- Specified by:
charsetWithDefaultin interfaceExampleConfig- Returns:
- the config value for charsetWithDefault
-
optionalInetAddress
public Optional<InetAddress> optionalInetAddress()
An InetAddress that may be specified.The value from the config file must conform to the same rules as the InetAddress constructor. Basically that means that IP addresses or hostnames can be specified.
- Specified by:
optionalInetAddressin interfaceExampleConfig- Returns:
- the config value for optionalInetAddress
-
-