Annotation Interface Configuration


@Retention(RUNTIME) @Target(TYPE) public @interface Configuration
Marks a plain class as a JShepherd configuration, allowing it to be loaded without extending ConfigurablePojo.

Annotated classes are loaded via ConfigurationLoader.from(path).loadPlain(MyConfig::new), which returns a Config<T> handle carrying the lifecycle operations (save(), reload(), getLastLoadIssues(), auto-reload control) — the POJO itself stays completely plain:


 @Configuration
 @Comment("Application settings")
 public class AppConfig {
     @Key("port")
     private int port = 8080;
 }

 Config<AppConfig> config = ConfigurationLoader.from(path).loadPlain(AppConfig::new);
 AppConfig app = config.get();
 config.save();
 

All other annotations (@Key, @Comment, @Section, @PostInject) work exactly as with the extends-based API.