Methods Summary |
---|
private static void | checkNonPrimitive(java.lang.String str)
Class c = Class.forName(str);
MBeanIntrospector intr = new MBeanIntrospector(c);
String msg = " Type = ";
msg += intr.isStandardMBean() ? "isStandard" :
intr.isDynamicMBean() ? "isDynamic" : "Don't know";
Debug.println(str + msg);
Debug.println("Management interface = " +
intr.getMBeanInterfaceClass().getName());
|
private static void | checkPrimitive(java.lang.String str)
Class c = null;
if (str.equals("int")) { c = int.class; }
else if (str.equals("boolean")) { c = boolean.class; }
else if (str.equals("short")) { c = short.class; }
else if (str.equals("byte")) { c = byte.class; }
else if (str.equals("char")) { c = char.class; }
else if (str.equals("float")) { c = float.class; }
else if (str.equals("long")) { c = long.class; }
else if (str.equals("double")) { c = double.class; }
new MBeanIntrospector(c);
|
private static boolean | isPrimitive(java.lang.String str)
return (str.equals("int") ||
str.equals("boolean") ||
str.equals("short") ||
str.equals("byte") ||
str.equals("char") ||
str.equals("float") ||
str.equals("long") ||
str.equals("double"));
|
public static void | main(java.lang.String[] args)
BufferedReader reader = new BufferedReader(new FileReader(args[0]));
String str;
long begin = System.currentTimeMillis();
while ((str = reader.readLine()) != null)
{
str = str.trim();
if (isPrimitive(str))
{
try
{
checkPrimitive(str);
Debug.println("Test failed : " + str);
}
catch (NotCompliantMBeanException e)
{
}
}
else
{
try
{
checkNonPrimitive(str);
}
catch (NotCompliantMBeanException e)
{
Debug.println("Not Compliant : " + str);
}
}
}
long end = System.currentTimeMillis();
//Debug.println("Time lapse = " + (end - begin));
reader.close();
|