Fix enum members' name
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / spi / meta / ModelProcessingPhase.java
1 /*
2  * Copyright (c) 2015 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.parser.spi.meta;
9
10 import javax.annotation.Nullable;
11
12 public enum ModelProcessingPhase {
13     /**
14      *
15      * Cross-source relationship resolution phase.
16      * <p>
17      * In this phase of processing only statements which affects
18      * cross-source relationship (e.g. imports / includes)
19      * are processed.
20      * <p>
21      * At end of this phase all source related contexts should
22      * be bind to their imports and includes to allow
23      * visibility of custom defined statements in following
24      * phases.
25      */
26     SOURCE_LINKAGE(null),
27     STATEMENT_DEFINITION(SOURCE_LINKAGE),
28     FULL_DECLARATION(STATEMENT_DEFINITION),
29     EFFECTIVE_MODEL(FULL_DECLARATION);
30
31     private final ModelProcessingPhase previousPhase;
32
33     private ModelProcessingPhase(@Nullable ModelProcessingPhase previous) {
34         this.previousPhase = previous;
35     }
36
37     public ModelProcessingPhase getPreviousPhase() {
38         return previousPhase;
39     }
40 }