YANGTOOLS-706: split out rfc8040-model-api
[yangtools.git] / yang / yang-parser-impl / src / test / java / org / opendaylight / yangtools / yang / thirdparty / plugin / CustomInferencePipeline.java
1 /*
2  * Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.yangtools.yang.thirdparty.plugin;
9
10 import static org.opendaylight.yangtools.yang.parser.spi.meta.NamespaceBehaviour.sourceLocal;
11
12 import org.opendaylight.yangtools.yang.parser.spi.meta.ModelProcessingPhase;
13 import org.opendaylight.yangtools.yang.parser.stmt.reactor.CrossSourceStatementReactor;
14 import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.ext.CustomStatementParserBuilder;
15
16 public final class CustomInferencePipeline {
17     public static final CrossSourceStatementReactor CUSTOM_REACTOR = new CustomStatementParserBuilder()
18             .addDefaultRFC6020Bundles()
19             .addStatementSupport(ModelProcessingPhase.FULL_DECLARATION, ThirdPartyExtensionSupport.getInstance())
20             .addNamespaceSupport(ModelProcessingPhase.FULL_DECLARATION, sourceLocal(ThirdPartyNamespace.class))
21             .build();
22
23     private CustomInferencePipeline() {
24         throw new UnsupportedOperationException("Utility class");
25     }
26 }