Package org.ldaptive
Class AbstractConfig
java.lang.Object
org.ldaptive.AbstractConfig
- Direct Known Subclasses:
ConnectionConfig
,SaslConfig
,SslConfig
Provides common implementations for configuration objects.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
checkArrayContainsNull
(Object[] array) Verifies that an array does not contain a null element.void
Verifies if this config is immutable.protected void
checkStringInput
(String s, boolean allowNull) Verifies that a string is not null or empty.void
Make this config immutable.
-
Field Details
-
logger
protected final org.slf4j.Logger loggerLogger for this class. -
immutable
private boolean immutableWhether this config has been marked immutable.
-
-
Constructor Details
-
AbstractConfig
public AbstractConfig()
-
-
Method Details
-
makeImmutable
public void makeImmutable()Make this config immutable. -
checkImmutable
public void checkImmutable()Verifies if this config is immutable.- Throws:
IllegalStateException
- if this config is immutable
-
checkArrayContainsNull
Verifies that an array does not contain a null element.- Parameters:
array
- to verify- Throws:
IllegalArgumentException
- if the array contains null
-
checkStringInput
Verifies that a string is not null or empty.- Parameters:
s
- to verifyallowNull
- whether null strings are valid- Throws:
IllegalArgumentException
- if the string is null or empty
-