Java Doc for StackTrace.java in  » Portal » uPortal_rel-2-6-1-GA » org » jasig » portal » lang » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Portal » uPortal_rel 2 6 1 GA » org.jasig.portal.lang 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jasig.portal.lang.StackTrace

StackTrace
final public class StackTrace (Code)
The StackTrace object represents a single stack frame of information. The entire set of stack frames is represented as an array of StackTrace object.

Note: The stack frame information is not always available because some JVMs strip some or all the required information.
author:
   Jan Nielsen
version:
   "$Revision: 35982 $"





Method Summary
final static  StackTrace[]convertStackTrace(Object[] stackTrace)
     Converts a JDK 1.4 stack trace to this object.
public  booleanequals(Object obj)
     Returns true if the specified object is another StackTrace instance representing the same execution point as this instance.
final public  StringgetClassName()
     Returns the name of the class.
final public  StringgetFileName()
     Returns the name of the source file.
final public  intgetLineNumber()
     Returns the line number in the source file.
final public  StringgetMethodName()
     Returns the name of the method.
final public static  StackTrace[]getStackTrace(Throwable throwable)
     Returns all StackTraces in an array of the specified throwable.
final static  StackTrace[]getStackTrace(Throwable throwable, String stackTrace)
     Returns all StackTraces in an array.
final public static  StackTrace[]getStackTrace()
     Returns the stack trace elements of the client.
final public static  StackTracegetStackTrace(int index)
     Returns the specified stack trace element if it exists.
public  inthashCode()
     Returns a hash code value for this stack trace element.
final public  booleanisNativeMethod()
     Returns true if method is implemented natively.
final public  StringtoString()
     Returns a representation of the stack frame element.
final public static  StringtoString(StackTrace[] elements)
     Returns a string representation of the stack trace elements.



Method Detail
convertStackTrace
final static StackTrace[] convertStackTrace(Object[] stackTrace)(Code)
Converts a JDK 1.4 stack trace to this object.
Parameters:
  stackTrace - array of JDK 1.4 stack trace objects array of StackTrace objects



equals
public boolean equals(Object obj)(Code)
Returns true if the specified object is another StackTrace instance representing the same execution point as this instance. Two stack trace elements a and b are equal if and only if:

 equals(a.getFileName(), b.getFileName()) &&
 a.getLineNumber() == b.getLineNumber()) &&
 equals(a.getClassName(), b.getClassName()) &&
 equals(a.getMethodName(), b.getMethodName())
 
where equals is defined as:

 static boolean equals(Object a, Object b) {
 return a==b || (a != null && a.equals(b));
 }
 

Parameters:
  obj - the object to be compared with this stack traceelement true if the specified object is anotherStackTrace instance representing the sameexecution point as this instance; otherwise false



getClassName
final public String getClassName()(Code)
Returns the name of the class. The parser should always be able to identify the calling class. name of the class



getFileName
final public String getFileName()(Code)
Returns the name of the source file. If the parser failed to find the source file name the value "Unknown" will be returned. name of the source file



getLineNumber
final public int getLineNumber()(Code)
Returns the line number in the source file. If the parser is unable to determine the line number the value -1 will be returned. If the parser determines the method is a native, a -2 is returned. source code line number, or -1 or -2



getMethodName
final public String getMethodName()(Code)
Returns the name of the method. The parser should alwas be able to identify the calling method name. name of the method



getStackTrace
final public static StackTrace[] getStackTrace(Throwable throwable)(Code)
Returns all StackTraces in an array of the specified throwable.
Parameters:
  throwable - throwable being parsed array of StackTraces
throws:
  NullPointerException - if throwable is null
throws:
  NullPointerException - if stackTrace is null
throws:
  IllegalArgumentException - if stackTrace is an emptystring



getStackTrace
final static StackTrace[] getStackTrace(Throwable throwable, String stackTrace)(Code)
Returns all StackTraces in an array. This method is used by the Chained* concrete classes to avoid a circular dependency. The throwable, and its string output must both be specified. Both are required because the throwable could be a com.sct.pipeline.lang.ChainedException which would result in a circular dependency if a printStackTrace was used in this method to retrieve the trace information. Invoke this method in the following fashion:
 StringWriter stringWriter = new StringWriter();
 PrintWriter printWriter = new PrintWriter(
 stringWriter
 );
 Throwable t = new Throwable();
 t.printStackTrace(
 printWriter
 );
 printWriter.close();
 StackTrace[] frames = getStackTraceElements(
 t,
 stringWriter.toString()
 );
 

Parameters:
  throwable - throwable being parsed
Parameters:
  stackTrace - string output ofthrowable.printStackTrace array of StackTraces
throws:
  NullPointerException - if throwable is null
throws:
  NullPointerException - if stackTrace is null
throws:
  IllegalArgumentException - if stackTrace is an empty string



getStackTrace
final public static StackTrace[] getStackTrace()(Code)
Returns the stack trace elements of the client. The array of stack trace elements start with the client's invoking frame in the zeroth element. array of stack trace elements of the client



getStackTrace
final public static StackTrace getStackTrace(int index)(Code)
Returns the specified stack trace element if it exists. If an invalid, either too large or too small, index is specified null is returned.
Parameters:
  index - index of the stack trace element to return stack trace element at the index or null



hashCode
public int hashCode()(Code)
Returns a hash code value for this stack trace element. hash code value



isNativeMethod
final public boolean isNativeMethod()(Code)
Returns true if method is implemented natively. true is native method; otherwisefalse



toString
final public String toString()(Code)
Returns a representation of the stack frame element. The format of the information may vary but the following examples are typical:
  • mycompany.MyClass.snap(MyClass.java:9)
  • mycompany.MyClass.snap(MyClass.java)
  • mycompany.MyClass.snap(Unknown Source)
  • mycompany.MyClass.snap(Native Method)
string presentation of the stack frame.



toString
final public static String toString(StackTrace[] elements)(Code)
Returns a string representation of the stack trace elements.
Parameters:
  elements - stack trace elements to stringify string representation of the stack trace array



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.