gitweb on Svarog

projekti pod git sistemom za održavanje verzija -- projects under the git version control system
TransMessages - make field private and add a reader if needed
authorDoni Pracner <quinnuendo@gmail.com>
Sun, 27 Jul 2014 21:16:16 +0000 (23:16 +0200)
committerDoni Pracner <quinnuendo@gmail.com>
Sun, 27 Jul 2014 21:16:16 +0000 (23:16 +0200)
src/com/qumaster/transformations/TransMessages.java

index 286a3d09be0782f1159f2539411c39763f9d8e4c..140bd47875333b45cad2a2ef0b7defe7effbfd4b 100644 (file)
@@ -26,7 +26,7 @@ import java.io.PrintStream;
  */
 public class TransMessages {
        private int printLevel;
-       public int[] messageCounters;
+       private int[] messageCounters;
        public static final int M_DEB = 0;
        public static final int M_WAR = 1;
        public static final int M_ERR = 2;
@@ -45,6 +45,13 @@ public class TransMessages {
                        messageCounters[level]++;
        }
 
+       public int getLevelMessageCount(int level){
+               if (level < messageCounters.length){
+                       return messageCounters[level];
+               }
+               return 0;
+       }
+
        public void printMessageCounters(PrintStream out){
                        out.println("total errors:"+messageCounters[TransMessages.M_ERR]+" warnings:"+messageCounters[TransMessages.M_WAR]);
        }
Svarog.pmf.uns.ac.rs/gitweb maintanance Doni Pracner