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 edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
11 import org.eclipse.jdt.annotation.NonNullByDefault;
12 import org.eclipse.jdt.annotation.Nullable;
15 @SuppressFBWarnings("NP_NULL_PARAM_DEREF_NONVIRTUAL")
16 public enum ModelProcessingPhase {
20 * Preliminary cross-source relationship resolution phase which collects available module names and module
21 * namespaces. It is necessary in order to correct resolution of unknown statements used in linkage phase (e.g.
22 * semantic version of yang modules).
24 SOURCE_PRE_LINKAGE(INIT),
27 * Cross-source relationship resolution phase.
30 * In this phase of processing only statements which affects cross-source relationship (e.g. imports / includes)
34 * At end of this phase all source related contexts should be bind to their imports and includes to allow
35 * visibility of custom defined statements in subsequent phases.
37 SOURCE_LINKAGE(SOURCE_PRE_LINKAGE),
38 STATEMENT_DEFINITION(SOURCE_LINKAGE),
39 FULL_DECLARATION(STATEMENT_DEFINITION),
40 EFFECTIVE_MODEL(FULL_DECLARATION);
42 private final @Nullable ModelProcessingPhase previousPhase;
44 ModelProcessingPhase(final @Nullable ModelProcessingPhase previous) {
45 this.previousPhase = previous;
48 public @Nullable ModelProcessingPhase getPreviousPhase() {