2 * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.yangtools.yang.parser.spi.meta;
10 import javax.annotation.Nullable;
12 public enum ModelProcessingPhase {
16 * Preliminary cross-source relationship resolution phase which collects
17 * available module names and module namespaces. It is necessary in order to
18 * correct resolution of unknown statements used in linkage phase (e.g.
19 * semantic version of yang modules).
21 SOURCE_PRE_LINKAGE(INIT),
24 * Cross-source relationship resolution phase.
26 * In this phase of processing only statements which affects cross-source
27 * relationship (e.g. imports / includes) are processed.
29 * At end of this phase all source related contexts should be bind to their
30 * imports and includes to allow visibility of custom defined statements in
33 SOURCE_LINKAGE(SOURCE_PRE_LINKAGE),
34 STATEMENT_DEFINITION(SOURCE_LINKAGE),
35 FULL_DECLARATION(STATEMENT_DEFINITION),
36 EFFECTIVE_MODEL(FULL_DECLARATION);
38 private final ModelProcessingPhase previousPhase;
40 ModelProcessingPhase(@Nullable ModelProcessingPhase previous) {
41 this.previousPhase = previous;
44 public ModelProcessingPhase getPreviousPhase() {