From 6ff7d7099a03663202b39e9084e5ccf67b21195e Mon Sep 17 00:00:00 2001 From: Doni Pracner Date: Sun, 27 Jul 2014 23:16:16 +0200 Subject: [PATCH] TransMessages - make field private and add a reader if needed --- src/com/qumaster/transformations/TransMessages.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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]); } -- 2.25.1