com.sun.enterprise.admin.cli.remote
Class ExceptionAnalyzer
java.lang.Object
com.sun.enterprise.admin.cli.remote.ExceptionAnalyzer
final class ExceptionAnalyzer
- extends java.lang.Object
An immutable class to analyze the exception stack trace of a given
instance of Exception. Can be extended to handle
throwables, but it is not done in this version on purpose. Takes the
snapshot of given exception at the time of instantiation.
- Since:
- GlassFish v3 Prelude
- Author:
- केदार (km@dev.java.net)
|
Field Summary |
private java.util.List<java.lang.Throwable> |
chain
|
private java.lang.Exception |
exc
|
|
Method Summary |
private void |
build()
|
(package private) java.lang.Throwable |
getFirstInstanceOf(java.lang.Class<? extends java.lang.Exception> ac)
Returns the first instance of the given Exception class in the chain
of causes. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
exc
private final java.lang.Exception exc
chain
private final java.util.List<java.lang.Throwable> chain
ExceptionAnalyzer
ExceptionAnalyzer(java.lang.Exception e)
build
private void build()
getFirstInstanceOf
java.lang.Throwable getFirstInstanceOf(java.lang.Class<? extends java.lang.Exception> ac)
- Returns the first instance of the given Exception class in the chain
of causes. The counting starts from the instance of the Exception that
created the ExceptionAnalyzer class itself.
- Parameters:
ac - the unknown subclass of Exception that needs the chain to be examined for
- Returns:
- first instance of given Throwable (returned object will be an
instance of the given class) or null if there is no such instance
Copyright © 2012 GlassFish Community. All Rights Reserved.