Index

A C D E F G H I K L M P R S T U V W 
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form

A

AbstractPersistenceDelegate<T> - Class in de.bsommerfeld.jshepherd.core
Abstract base class for all persistence delegates.
AbstractPersistenceDelegate(Path, boolean) - Constructor for class de.bsommerfeld.jshepherd.core.AbstractPersistenceDelegate
 
AbstractPersistenceDelegate.DataExtractor - Interface in de.bsommerfeld.jshepherd.core
Abstraction for extracting values from different data formats.
applyDataToInstance(T, AbstractPersistenceDelegate.DataExtractor) - Method in class de.bsommerfeld.jshepherd.core.AbstractPersistenceDelegate
Applies data from parsed format to POJO instance using reflection.

C

ClassUtils - Class in de.bsommerfeld.jshepherd.utils
 
ClassUtils() - Constructor for class de.bsommerfeld.jshepherd.utils.ClassUtils
 
Comment - Annotation Interface in de.bsommerfeld.jshepherd.annotation
Adds comments to a configuration field or to the class (for file header).
Config<T> - Interface in de.bsommerfeld.jshepherd.core
Lifecycle handle for a plain @Configuration POJO loaded via ConfigurationLoader.from(path).loadPlain(...).
ConfigurablePojo<SELF> - Class in de.bsommerfeld.jshepherd.core
Abstract base class for configuration POJOs that can be saved and reloaded.
ConfigurablePojo() - Constructor for class de.bsommerfeld.jshepherd.core.ConfigurablePojo
 
Configuration - Annotation Interface in de.bsommerfeld.jshepherd.annotation
Marks a plain class as a JShepherd configuration, allowing it to be loaded without extending ConfigurablePojo.
ConfigurationException - Exception Class in de.bsommerfeld.jshepherd.core
Custom runtime exception thrown for errors encountered during configuration loading, saving, parsing, or other configuration-related operations within the JShepherd library.
ConfigurationException(String) - Constructor for exception class de.bsommerfeld.jshepherd.core.ConfigurationException
Constructs a new configuration exception with the specified detail message.
ConfigurationException(String, Throwable) - Constructor for exception class de.bsommerfeld.jshepherd.core.ConfigurationException
Constructs a new configuration exception with the specified detail message and cause.
ConfigurationLoader - Class in de.bsommerfeld.jshepherd.core
Entry point for loading configuration files.
ConfigurationLoader() - Constructor for class de.bsommerfeld.jshepherd.core.ConfigurationLoader
 
ConfigurationLoader.Builder - Class in de.bsommerfeld.jshepherd.core
Fluent builder for constructing and loading configuration.
convertNumericIfNeeded(Object, Class<?>) - Method in class de.bsommerfeld.jshepherd.core.AbstractPersistenceDelegate
Converts values to match the target type.
convertValueForField(Object, Field) - Method in class de.bsommerfeld.jshepherd.core.AbstractPersistenceDelegate
Converts a raw parsed value to the field's type, including element-wise conversion for typed lists and maps (e.g.
create(Path, boolean) - Method in interface de.bsommerfeld.jshepherd.core.PersistenceDelegateFactory
Creates a persistence delegate for the specified file path.

D

de.bsommerfeld.jshepherd.annotation - package de.bsommerfeld.jshepherd.annotation
 
de.bsommerfeld.jshepherd.core - module de.bsommerfeld.jshepherd.core
 
de.bsommerfeld.jshepherd.core - package de.bsommerfeld.jshepherd.core
 
de.bsommerfeld.jshepherd.utils - package de.bsommerfeld.jshepherd.utils
 

E

equals(Object) - Method in record class de.bsommerfeld.jshepherd.core.LoadIssue
Indicates whether some other object is "equal to" this one.

F

filePath - Variable in class de.bsommerfeld.jshepherd.core.AbstractPersistenceDelegate
 
from(Path) - Static method in class de.bsommerfeld.jshepherd.core.ConfigurationLoader
Starts building a configuration loader for the specified file path.

G

get() - Method in interface de.bsommerfeld.jshepherd.core.Config
Returns the configuration POJO.
getAllFieldsInHierarchy(Class<?>, Class<?>) - Static method in class de.bsommerfeld.jshepherd.utils.ClassUtils
Gets all declared fields from the given class and its superclasses, up to (but not including) Object.class or a specified stop class.
getFactory(String) - Static method in class de.bsommerfeld.jshepherd.core.PersistenceDelegateFactoryRegistry
Gets the appropriate factory for the given file extension.
getLastLoadIssues() - Method in class de.bsommerfeld.jshepherd.core.AbstractPersistenceDelegate
 
getLastLoadIssues() - Method in interface de.bsommerfeld.jshepherd.core.Config
Returns the per-key issues from the last load or reload (TOML and Properties formats).
getLastLoadIssues() - Method in class de.bsommerfeld.jshepherd.core.ConfigurablePojo
Returns the values from the last load or reload that could not be applied to their fields (e.g.
getLastLoadIssues() - Method in interface de.bsommerfeld.jshepherd.core.PersistenceDelegate
Returns the per-key issues recorded during the last load or reload.
getNonSectionFields(Class<?>, Class<?>) - Method in class de.bsommerfeld.jshepherd.core.AbstractPersistenceDelegate
Gets all non-section fields (regular @Key fields) from a class.
getSectionFields(Class<?>, Class<?>) - Method in class de.bsommerfeld.jshepherd.core.AbstractPersistenceDelegate
Gets all section fields from a class.
getSectionPojoFields(Object) - Method in class de.bsommerfeld.jshepherd.core.AbstractPersistenceDelegate
Gets all fields from a nested section POJO that have @Key annotation.
getSectionPojoSubsectionFields(Object) - Method in class de.bsommerfeld.jshepherd.core.AbstractPersistenceDelegate
Gets all nested @Section fields of a section POJO, enabling recursive section nesting.
getSupportedExtensions() - Method in interface de.bsommerfeld.jshepherd.core.PersistenceDelegateFactory
Returns the file extensions this factory supports (e.g., "json", "yaml", "yml").
getValue(String, Class<?>) - Method in interface de.bsommerfeld.jshepherd.core.AbstractPersistenceDelegate.DataExtractor
 

H

hashCode() - Method in record class de.bsommerfeld.jshepherd.core.LoadIssue
Returns a hash code value for this object.
hasValue(String) - Method in interface de.bsommerfeld.jshepherd.core.AbstractPersistenceDelegate.DataExtractor
 

I

isAutoReloadActive() - Method in interface de.bsommerfeld.jshepherd.core.Config
Returns whether the configuration file is being watched for changes.
isAutoReloadActive() - Method in class de.bsommerfeld.jshepherd.core.ConfigurablePojo
Returns whether this configuration is being watched for external file changes.
isEnumType(Class<?>) - Method in class de.bsommerfeld.jshepherd.core.AbstractPersistenceDelegate
Checks if the given type is an enum type.
isSection(Field) - Method in class de.bsommerfeld.jshepherd.core.AbstractPersistenceDelegate
Checks if a field is annotated with @Section.

K

key() - Method in record class de.bsommerfeld.jshepherd.core.LoadIssue
Returns the value of the key record component.
Key - Annotation Interface in de.bsommerfeld.jshepherd.annotation
Specifies the key name to be used for this field in the configuration file.

L

load(Path, Supplier<T>) - Static method in class de.bsommerfeld.jshepherd.core.ConfigurationLoader
Loads configuration from the specified file path with comments enabled.
load(Path, Supplier<T>, boolean) - Static method in class de.bsommerfeld.jshepherd.core.ConfigurationLoader
Loads configuration from the specified file path.
load(Supplier<T>) - Method in class de.bsommerfeld.jshepherd.core.ConfigurationLoader.Builder
Loads the configuration using the specified default POJO supplier.
loadInitial(Supplier<T>) - Method in class de.bsommerfeld.jshepherd.core.AbstractPersistenceDelegate
 
loadInitial(Supplier<T>) - Method in interface de.bsommerfeld.jshepherd.core.PersistenceDelegate
Loads the initial POJO instance from the persistent store, or creates and saves a default if the store is new or empty.
LoadIssue - Record Class in de.bsommerfeld.jshepherd.core
Describes a single value that could not be applied during a load or reload — for example a string that does not parse into a numeric field, or an unknown enum constant.
LoadIssue(String, Object, Class<?>, String) - Constructor for record class de.bsommerfeld.jshepherd.core.LoadIssue
Creates an instance of a LoadIssue record class.
loadPlain(Supplier<T>) - Method in class de.bsommerfeld.jshepherd.core.ConfigurationLoader.Builder
Loads a plain @Configuration-annotated POJO (no need to extend ConfigurablePojo) and returns a Config handle that carries the lifecycle operations:

M

MAX_SECTION_DEPTH - Static variable in class de.bsommerfeld.jshepherd.core.AbstractPersistenceDelegate
Safety cap for recursive @Section nesting, protecting against accidental cycles in section POJO graphs.
message() - Method in record class de.bsommerfeld.jshepherd.core.LoadIssue
Returns the value of the message record component.

P

PersistenceDelegate<T> - Interface in de.bsommerfeld.jshepherd.core
Internal interface for handling the actual persistence mechanics (loading, saving, reloading) for a given configuration POJO type — either a ConfigurablePojo subclass or a plain @Configuration class.
PersistenceDelegateFactory - Interface in de.bsommerfeld.jshepherd.core
Base interface for all persistence delegate factories.
PersistenceDelegateFactoryRegistry - Class in de.bsommerfeld.jshepherd.core
Registry for persistence delegate factories using the Service Provider Interface pattern.
PersistenceDelegateFactoryRegistry() - Constructor for class de.bsommerfeld.jshepherd.core.PersistenceDelegateFactoryRegistry
 
PostInject - Annotation Interface in de.bsommerfeld.jshepherd.annotation
Marks a method to be invoked after configuration field injection has completed.

R

rawValue() - Method in record class de.bsommerfeld.jshepherd.core.LoadIssue
Returns the value of the rawValue record component.
recordLoadIssue(String, Object, Class<?>, Exception) - Method in class de.bsommerfeld.jshepherd.core.AbstractPersistenceDelegate
Records a value that could not be applied to its field.
registerFactory(PersistenceDelegateFactory) - Static method in class de.bsommerfeld.jshepherd.core.PersistenceDelegateFactoryRegistry
Registers a factory manually (useful for testing or dynamic registration).
reload() - Method in interface de.bsommerfeld.jshepherd.core.Config
Reloads the POJO's fields from the configuration file and re-runs @PostInject methods.
reload() - Method in class de.bsommerfeld.jshepherd.core.ConfigurablePojo
Reloads the state of this configuration object from its persistent store.
reload(T) - Method in class de.bsommerfeld.jshepherd.core.AbstractPersistenceDelegate
 
reload(T) - Method in interface de.bsommerfeld.jshepherd.core.PersistenceDelegate
Reloads data from the persistent store into the provided POJO instance, updating its fields.
resolveGenericClass(Field, int) - Method in class de.bsommerfeld.jshepherd.core.AbstractPersistenceDelegate
Resolves the class of a field's generic type argument (e.g. the element type of a List<Integer>), or null if not determinable.
resolveKey(Field) - Method in class de.bsommerfeld.jshepherd.core.AbstractPersistenceDelegate
Resolves the configuration key for a field, using @Key annotation value or field name.
resolveSectionName(Field) - Method in class de.bsommerfeld.jshepherd.core.AbstractPersistenceDelegate
Resolves the section name from @Section annotation, falling back to @Key or field name.

S

save() - Method in interface de.bsommerfeld.jshepherd.core.Config
Saves the current state of the POJO to the configuration file.
save() - Method in class de.bsommerfeld.jshepherd.core.ConfigurablePojo
Saves the current state of this configuration object to its persistent store.
save(T) - Method in class de.bsommerfeld.jshepherd.core.AbstractPersistenceDelegate
 
save(T) - Method in interface de.bsommerfeld.jshepherd.core.PersistenceDelegate
Saves the provided POJO instance to the persistent store.
saveSimple(T, Path) - Method in class de.bsommerfeld.jshepherd.core.AbstractPersistenceDelegate
Format-specific simple save implementation.
saveWithComments(T, Path) - Method in class de.bsommerfeld.jshepherd.core.AbstractPersistenceDelegate
Format-specific save with comments implementation.
Section - Annotation Interface in de.bsommerfeld.jshepherd.annotation
Marks a field to be serialized as a nested section/table in the configuration file.
serializeEnumValue(Object) - Method in class de.bsommerfeld.jshepherd.core.AbstractPersistenceDelegate
Returns the constant name of an enum value for format-agnostic serialization.
setOnAutoReload(Runnable) - Method in interface de.bsommerfeld.jshepherd.core.Config
Registers a listener invoked after an automatic reload (requires auto-reload to be enabled via the loader builder).
setOnAutoReload(Runnable) - Method in class de.bsommerfeld.jshepherd.core.ConfigurablePojo
Registers a listener that is invoked after this configuration has been automatically reloaded because the file changed on disk.
shouldSkipField(Field) - Method in class de.bsommerfeld.jshepherd.core.AbstractPersistenceDelegate
Checks if a field should be skipped during persistence operations.
stopAutoReload() - Method in interface de.bsommerfeld.jshepherd.core.Config
Stops watching the configuration file.
stopAutoReload() - Method in class de.bsommerfeld.jshepherd.core.ConfigurablePojo
Stops watching the configuration file for external changes.

T

targetType() - Method in record class de.bsommerfeld.jshepherd.core.LoadIssue
Returns the value of the targetType record component.
toString() - Method in record class de.bsommerfeld.jshepherd.core.LoadIssue
Returns a string representation of this record class.
tryLoadFromFile(T) - Method in class de.bsommerfeld.jshepherd.core.AbstractPersistenceDelegate
Format-specific loading implementation.

U

useComplexSaveWithComments - Variable in class de.bsommerfeld.jshepherd.core.AbstractPersistenceDelegate
 

V

value() - Element in annotation interface de.bsommerfeld.jshepherd.annotation.Comment
The comments to the configuration value.
value() - Element in annotation interface de.bsommerfeld.jshepherd.annotation.Key
The name of the configuration value inside the configuration file.
value() - Element in annotation interface de.bsommerfeld.jshepherd.annotation.Section
The section/table name in the configuration file.

W

withAutoReload() - Method in class de.bsommerfeld.jshepherd.core.ConfigurationLoader.Builder
Enables automatic reloading: the configuration file is watched on a background daemon thread and the POJO is reloaded whenever the file changes on disk.
withAutoReload(Duration) - Method in class de.bsommerfeld.jshepherd.core.ConfigurationLoader.Builder
Enables automatic reloading with a custom poll interval.
withComments() - Method in class de.bsommerfeld.jshepherd.core.ConfigurationLoader.Builder
Enables comment preservation and generation.
withoutComments() - Method in class de.bsommerfeld.jshepherd.core.ConfigurationLoader.Builder
Disables comment handling for faster, simpler serialization.
writeClassComments(PrintWriter, T) - Method in class de.bsommerfeld.jshepherd.core.AbstractPersistenceDelegate
Writes class-level comments (file header) from @Comment annotation on the POJO class.
writeFieldComments(PrintWriter, Field) - Method in class de.bsommerfeld.jshepherd.core.AbstractPersistenceDelegate
Writes field-level comments from @Comment annotation.
A C D E F G H I K L M P R S T U V W 
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form