Skip to content

All Contents โ€‹

In some cases you may just want to load all the contents of a file into a single field. This can be done using the @AllContents annotation.

java
@Config("config.yml")
public class DefaultConfig {
    @AllContents;
    public final byte[] contents;

    public static DefaultConfig New() {
        return DeclarativeYAML.From(DefaultConfig.class)
    }
}

๐Ÿ”ฅ DANGER

The field type for a field annotated with @AllContents must be of type byte[].

Released under the GPL-3.0 License.