Currently I find difficult to know what are the configuration options for the kernel. Some of them are accessible via KernelConfiguration, some of them are accessible through kernel params and it's also difficult to find all the kernel params.
So I propose an option system à la XNIO (javadoc).
Add a typed option:
public class KernelOption<T>
{
private String name;
private T value;
}
Group all the options in a class KernelOptions:
public class KernelOptions
{
public static final KernelOption<List<String>> ROOT_PACKAGES = new KernelOption<List<String>>("root.packages");
public static final KernelOption<Boolean> PRINT_SCAN_WARN = new KernelOption<Boolean>("scan.warn.disable");
...
}
Add an option method on KernelConfiguration:
<T> KernelConfiguration option(KernelOption<T> option, T value)
Coverage decreased (-0.2%) to 80.387% when pulling d78e0199c766527c40c0c776b0d89fef3284b65b on fix-59-rootPackages into 0494c47f20eb0e4ad4eaf775199f5ac2c924cd58 on master.
Currently I find difficult to know what are the configuration options for the kernel. Some of them are accessible via KernelConfiguration, some of them are accessible through kernel params and it's also difficult to find all the kernel params.
So I propose an option system à la XNIO (javadoc).
Add a typed option:
Group all the options in a class
KernelOptions
:Add an option method on
KernelConfiguration
:Then use it as follows:
As a bonus this PR also add a fixture to factorize the kernel creation in the tests.