From: Doni Pracner Date: Sun, 27 Jul 2014 21:16:16 +0000 (+0200) Subject: TransMessages - make field private and add a reader if needed X-Git-Tag: v0.2.0~24 X-Git-Url: https://svarog.pmf.uns.ac.rs/gitweb/?a=commitdiff_plain;h=6ff7d7099a03663202b39e9084e5ccf67b21195e;p=mjc2wsl.git TransMessages - make field private and add a reader if needed --- diff --git a/src/com/qumaster/transformations/TransMessages.java b/src/com/qumaster/transformations/TransMessages.java index 286a3d0..140bd47 100644 --- a/src/com/qumaster/transformations/TransMessages.java +++ b/src/com/qumaster/transformations/TransMessages.java @@ -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]); }