Fork me on GitHub

Disabling features

If for some reasons some feature is causing some problems it is possible, for some of them, to be disabled. For instance, if you are implementing the variable expansion by yourself, you may want to disable the variable expansion provided by OWNER.

This can be done using the @DisabledFeature annotation.

The @DisabledFeature can also be combined with multiple DisableableFeature and it can be used on method level or on class level:

// on class level...
public interface SampleConfig extends Config {
    public String planet();

    // on method level...
    @DefaultValue("Hello %s, welcome on ${planet}!")
    public String hello(String name); 

In the above example the method String hello(String name) will return the String “Hello %s, welcome on ${planet}!”, ignoring the parameter passed.