Hide BuildGlobalContext methods 41/47441/2
authorRobert Varga <rovarga@cisco.com>
Sun, 23 Oct 2016 14:35:30 +0000 (16:35 +0200)
committerAnil Belur <abelur@linuxfoundation.org>
Sun, 30 Oct 2016 11:51:31 +0000 (11:51 +0000)
Non-public class, there is no point in having its methods
declared as public.

Change-Id: Iba52f5c7fb9da4fa5b79ca37308f5af126aaf7d0
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 703f39878f5b52a337584078b9e32538d9ea06df)

yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/BuildGlobalContext.java

index 6480ab9af0d2f5431a4ef7b8de2912591ff53295..5947639c2631ea4046babc153b4fba867bbc71dd 100644 (file)
@@ -72,7 +72,7 @@ class BuildGlobalContext extends NamespaceStorageSupport implements NamespaceBeh
 
     private final boolean enabledSemanticVersions;
 
-    public BuildGlobalContext(final Map<ModelProcessingPhase, StatementSupportBundle> supports,
+    BuildGlobalContext(final Map<ModelProcessingPhase, StatementSupportBundle> supports,
             final StatementParserMode statementParserMode, final Predicate<QName> isFeatureSupported) {
         super();
         this.supports = Preconditions.checkNotNull(supports, "BuildGlobalContext#supports cannot be null");
@@ -83,7 +83,7 @@ class BuildGlobalContext extends NamespaceStorageSupport implements NamespaceBeh
                 Preconditions.checkNotNull(isFeatureSupported, "Supported feature predicate must not be null."));
     }
 
-    public BuildGlobalContext(final Map<ModelProcessingPhase, StatementSupportBundle> supports,
+    BuildGlobalContext(final Map<ModelProcessingPhase, StatementSupportBundle> supports,
             final Map<ValidationBundleType, Collection<?>> supportedValidation,
             final StatementParserMode statementParserMode, final Predicate<QName> isFeatureSupported) {
         super();
@@ -99,15 +99,15 @@ class BuildGlobalContext extends NamespaceStorageSupport implements NamespaceBeh
                 Preconditions.checkNotNull(isFeatureSupported, "Supported feature predicate must not be null."));
     }
 
-    public boolean isEnabledSemanticVersioning() {
+    boolean isEnabledSemanticVersioning() {
         return enabledSemanticVersions;
     }
 
-    public StatementSupportBundle getSupportsForPhase(final ModelProcessingPhase currentPhase) {
+    StatementSupportBundle getSupportsForPhase(final ModelProcessingPhase currentPhase) {
         return supports.get(currentPhase);
     }
 
-    public void addSource(@Nonnull final StatementStreamSource source) {
+    void addSource(@Nonnull final StatementStreamSource source) {
         sources.add(new SourceSpecificContext(this, source));
     }
 
@@ -162,7 +162,7 @@ class BuildGlobalContext extends NamespaceStorageSupport implements NamespaceBeh
         return new SimpleNamespaceContext<>(potentialRaw);
     }
 
-    public StatementDefinitionContext<?, ?, ?> getStatementDefinition(final QName name) {
+    StatementDefinitionContext<?, ?, ?> getStatementDefinition(final QName name) {
         StatementDefinitionContext<?, ?, ?> potential = definitions.get(name);
         if (potential == null) {
             final StatementSupport<?, ?, ?> potentialRaw = supports.get(currentPhase).getStatementDefinition(name);
@@ -174,7 +174,7 @@ class BuildGlobalContext extends NamespaceStorageSupport implements NamespaceBeh
         return potential;
     }
 
-    public EffectiveModelContext build() throws SourceException, ReactorException {
+    EffectiveModelContext build() throws SourceException, ReactorException {
         for (final ModelProcessingPhase phase : PHASE_EXECUTION_ORDER) {
             startPhase(phase);
             loadPhaseStatements();
@@ -193,7 +193,7 @@ class BuildGlobalContext extends NamespaceStorageSupport implements NamespaceBeh
         return new EffectiveModelContext(rootStatements);
     }
 
-    public EffectiveSchemaContext buildEffective() throws ReactorException {
+    EffectiveSchemaContext buildEffective() throws ReactorException {
         for (final ModelProcessingPhase phase : PHASE_EXECUTION_ORDER) {
             startPhase(phase);
             loadPhaseStatements();
@@ -231,6 +231,7 @@ class BuildGlobalContext extends NamespaceStorageSupport implements NamespaceBeh
             source.startPhase(phase);
         }
         currentPhase = phase;
+        LOG.debug("Global phase {} started", phase);
     }
 
     private void loadPhaseStatements() throws ReactorException {
@@ -336,9 +337,10 @@ class BuildGlobalContext extends NamespaceStorageSupport implements NamespaceBeh
     private void endPhase(final ModelProcessingPhase phase) {
         Preconditions.checkState(currentPhase == phase);
         finishedPhase = currentPhase;
+        LOG.debug("Global phase {} finished", phase);
     }
 
-    public Set<SourceSpecificContext> getSources() {
+    Set<SourceSpecificContext> getSources() {
         return sources;
     }
 }