VerifierResultsImplpublic class VerifierResultsImpl extends Object implements VerifierResultsResults of a Verifier Invocation from Backend |
Fields Summary |
---|
static Logger | _logger | private static com.sun.enterprise.util.LocalStringManagerImpl | localStrings | private static Class | resultsReportClass | private static Method | failedCountMethod | private static Method | errorCountMethod | private static Method | warningCountMethod | private Object | resultObj |
Constructors Summary |
---|
public VerifierResultsImpl(Object result)
resultObj = result;
|
Methods Summary |
---|
public int | getErrorCount()return number of errors in verification
init();
if ((errorCountMethod == null) || (resultObj == null)) {
return -1;
}
String name = resultsReportClass.getName();
try {
Object result = errorCountMethod.invoke(resultObj, (Object[])null);
return ((Integer)result).intValue();
} catch (IllegalAccessException e) {
_logger.log(Level.SEVERE,"verification.class.access.error", new Object[] {name});
} catch (InvocationTargetException e) {
_logger.log(Level.SEVERE,"verification.method.error", new Object[] {"verifyEar",
e.getMessage()});
}
return -1;
| public int | getFailedCount()return number of failures in verification
init();
if ((failedCountMethod == null) || (resultObj == null)) {
return -1;
}
String name = resultsReportClass.getName();
try {
Object result = failedCountMethod.invoke(resultObj, (Object[])null);
return ((Integer)result).intValue();
} catch (IllegalAccessException e) {
_logger.log(Level.SEVERE,"verification.class.access.error", new Object[] {name});
} catch (InvocationTargetException e) {
_logger.log(Level.SEVERE,"verification.method.error", new Object[] {"verifyEar",
e.getMessage()});
}
return -1;
| public int | getWarningCount()return number of warnings in verification
init();
if ((warningCountMethod == null) || (resultObj == null)) {
return -1;
}
String name = resultsReportClass.getName();
try {
Object result = warningCountMethod.invoke(resultObj, (Object[])null);
return ((Integer)result).intValue();
} catch (IllegalAccessException e) {
_logger.log(Level.SEVERE,"verification.class.access.error", new Object[] {name});
} catch (InvocationTargetException e) {
_logger.log(Level.SEVERE,"verification.method.error", new Object[] {"verifyEar",
e.getMessage()});
}
return -1;
| private void | init()
if (resultsReportClass != null) {
return;
}
String name = null;
try {
name = System.getProperty("j2ee.verifier.ResultsReport",
"com.sun.enterprise.tools.verifier.ResultsReport");
resultsReportClass = Class.forName(name);
warningCountMethod = resultsReportClass.getDeclaredMethod("getWarningCount", (Class[])null);
failedCountMethod = resultsReportClass.getDeclaredMethod("getFailedCount", (Class[])null);
errorCountMethod = resultsReportClass.getDeclaredMethod("getErrorCount", (Class[])null);
} catch (ClassNotFoundException e) {
_logger.log(Level.SEVERE,"verification.class.notfound", new Object[] {name});
}
catch (NoSuchMethodException e) {
_logger.log(Level.SEVERE,"verification.method.notfound", new Object[] {e.getMessage() , name});
}
|
|