-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathConfigurationEntry.java
More file actions
27 lines (24 loc) · 942 Bytes
/
ConfigurationEntry.java
File metadata and controls
27 lines (24 loc) · 942 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package com.github.joschi.jadconfig.documentation;
import jakarta.annotation.Nullable;
/**
* @param configurationBean Class that defines this configuration entry
* @param fieldName java field name
* @param type Java type name, e.g. String or Integer.
* @param configName configuration property name, as written in the config file
* @param defaultValue default value declared in the java field, null if not defined
* @param required if the configuration property is mandatory (needs default or entry in the config file)
* @param documentation textual documentation of this configuration propery
*/
public record ConfigurationEntry(
Class<?> configurationBean,
String fieldName,
String type,
String configName,
@Nullable Object defaultValue,
boolean required,
String documentation
) {
public boolean hasPriority() {
return required && defaultValue == null;
}
}