- private static GrammarCache createGrammarCache(final EXIOptions exiOptions) {
- short go = GrammarOptions.DEFAULT_OPTIONS;
- if (exiOptions.getPreserveComments()) {
- go = GrammarOptions.addCM(go);
- }
- if (exiOptions.getPreserveDTD()) {
- go = GrammarOptions.addDTD(go);
- }
- if (exiOptions.getPreserveNS()) {
- go = GrammarOptions.addNS(go);
- }
- if (exiOptions.getPreservePIs()) {
- go = GrammarOptions.addPI(go);
- }
-
- return GRAMMAR_CACHES.getUnchecked(go);
+ public static NetconfEXICodec forParameters(final EXIParameters parameters) {
+ return CODECS.getUnchecked(parameters);