feat: block rule of type CustomBlockRule

This commit is contained in:
oSumAtrIX 2022-11-19 23:24:25 +01:00
parent 09c7605f1f
commit 571cf12dca
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4

View File

@ -52,7 +52,7 @@ final class BlockRule {
} }
} }
private final SettingsEnum setting; protected final SettingsEnum setting;
private final String[] blocks; private final String[] blocks;
/** /**
@ -75,6 +75,19 @@ final class BlockRule {
} }
} }
final class CustomBlockRule extends BlockRule {
/**
* Initialize a new rule for components.
*
* @param setting The setting which controls the blocking of the components.
* @param filter The setting which contains the list of component names.
*/
public CustomBlockRule(final SettingsEnum setting, final SettingsEnum filter) {
super(setting, filter.getString().split(","));
}
}
abstract class Filter { abstract class Filter {
final LithoBlockRegister pathRegister = new LithoBlockRegister(); final LithoBlockRegister pathRegister = new LithoBlockRegister();
final LithoBlockRegister identifierRegister = new LithoBlockRegister(); final LithoBlockRegister identifierRegister = new LithoBlockRegister();