Record Class ConfigurationEntry
java.lang.Object
java.lang.Record
com.github.joschi.jadconfig.documentation.ConfigurationEntry
- Record Components:
configurationBean- Class that defines this configuration entryfieldName- java field nametype- Java type name, e.g. String or Integer.configName- configuration property name, as written in the config filedefaultValue- default value declared in the java field, null if not definedrequired- if the configuration property is mandatory (needs default or entry in the config file)documentation- textual documentation of this configuration propery
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconfigNamerecord component.Class<?> Returns the value of theconfigurationBeanrecord component.Returns the value of thedefaultValuerecord component.Returns the value of thedocumentationrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefieldNamerecord component.final inthashCode()Returns a hash code value for this object.booleanbooleanrequired()Returns the value of therequiredrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
ConfigurationEntry
public ConfigurationEntry(Class<?> configurationBean, String fieldName, String type, String configName, @Nullable Object defaultValue, boolean required, String documentation) Creates an instance of aConfigurationEntryrecord class.- Parameters:
configurationBean- the value for theconfigurationBeanrecord componentfieldName- the value for thefieldNamerecord componenttype- the value for thetyperecord componentconfigName- the value for theconfigNamerecord componentdefaultValue- the value for thedefaultValuerecord componentrequired- the value for therequiredrecord componentdocumentation- the value for thedocumentationrecord component
-
-
Method Details
-
hasPriority
public boolean hasPriority() -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
configurationBean
Returns the value of theconfigurationBeanrecord component.- Returns:
- the value of the
configurationBeanrecord component
-
fieldName
Returns the value of thefieldNamerecord component.- Returns:
- the value of the
fieldNamerecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
configName
Returns the value of theconfigNamerecord component.- Returns:
- the value of the
configNamerecord component
-
defaultValue
Returns the value of thedefaultValuerecord component.- Returns:
- the value of the
defaultValuerecord component
-
required
public boolean required()Returns the value of therequiredrecord component.- Returns:
- the value of the
requiredrecord component
-
documentation
Returns the value of thedocumentationrecord component.- Returns:
- the value of the
documentationrecord component
-