1 package com.protomatter.util; 2 3 52 53 import java.util.*; 54 import java.lang.reflect.*; 55 56 59 public class MessageConstants 60 { 61 public static final String CAUSED_BY = "CausedBy"; 62 63 public static final String MIME_EXCEPTION_IN_INPUT = "MIME.ExceptionInInput"; 64 65 public static final String MIME_ALL_WHITESPACE = "MIME.AllWhitespace"; 66 67 public static final String MIME_EXCEPTION_IN_SEPARATOR = "MIME.ExceptionInSeparator"; 68 69 public static final String MIME_EXCEPTION_IN_PARSE = "MIME.ExceptionInParse"; 70 71 public static final String MIME_SEPARATOR_NOT_FOUND = "MIME.SeparatorNotFound"; 72 73 public static final String STACK_TRACE_INFO_UNKNOWN = "StackTraceInfo.unknown"; 74 75 private MessageConstants() 76 { 77 super(); 78 } 79 80 83 public static void main(String args[]) 84 throws Exception 85 { 86 Class c = MessageConstants.class; 87 System.out.println("Constants class: " + c.getName()); 88 System.out.println("Locale: " + Locale.getDefault()); 89 System.out.println(""); 90 Field fields[] = c.getDeclaredFields(); 91 int count = 0; 92 for (int i=0; i<fields.length; i++) 93 { 94 if (fields[i].getType() == String .class) 95 { 96 String name = fields[i].getName(); 97 String value = (String )fields[i].get(null); 98 String val = UtilResources.getResourceString(value); 99 System.out.println("Variable name: " + name); 100 System.out.println(" value: " + value); 101 System.out.println(" property: " + val); 102 System.out.println(""); 103 count++; 104 } 105 } 106 System.out.println("Found " + count + " messages."); 107 } 108 } 109 | Popular Tags |