Java Doc for Trace.java in  » IDE-Netbeans » visualweb.api.designer » org » netbeans » modules » visualweb » extension » openide » util » 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 » IDE Netbeans » visualweb.api.designer » org.netbeans.modules.visualweb.extension.openide.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.netbeans.modules.visualweb.extension.openide.util.TraceBase
      org.netbeans.modules.visualweb.extension.openide.util.Trace

All known Subclasses:   org.netbeans.modules.visualweb.extension.openide.util.TraceUI,
Trace
public class Trace extends TraceBase (Code)
Used for logging output to help debug netbeans modules. Debug messages are logged into a specific category which must be "enabled" in order for the output to make it to the console or logger.

The trace messages all return true (always). This makes them suitable as assertions - to take advantage of the conditional processing of assertions. E.g "assert Trace.trace(compute());". Here the Trace call will only be processed (and its arguments evaluated) when assertions are enabled. Obviously you must run with assertions enabled if you use the Trace library this way.
author:
   Joe Nuxoll



Field Summary
public static  intcounter
     This is a global counter variable that is handy to use when tracing repetitive tasks.
public static  PrintStreamout
    


Method Summary
public static  voiddisableTraceCategory(String category)
    
public static  voiddisableTraceCategory(Class category)
    
public static  voidenableTraceCategory(String category)
    
public static  voidenableTraceCategory(Class category)
    
public static  booleanflush()
    
public static  booleanisOutputEnabled()
    
public static  booleanprintStackTrace()
     Prints a stack trace of the current thread to the Trace.out stream.
public static  booleanprintStackTrace(Throwable t)
     Prints the specified exception stack trace to the Trace.out stream.
public static  voidsetOutputEnabled(boolean enabled)
    
public static  voidsetOutputStream(PrintStream log)
     Sets the output stream to be used for tracing.
public static  booleantrace(String category, String message)
    
public static  booleantrace(Class category, String message)
    
public static  booleantrace(String category, Throwable t)
    
public static  booleantrace(Class category, Throwable t)
    
public static  booleanwarnTrace(String category, boolean condition, String message)
    
public static  booleanwarnTrace(Class category, boolean condition, String message)
    
public static  booleanwarnTrace(String category, String message)
    
public static  booleanwarnTrace(Class category, String message)
    

Field Detail
counter
public static int counter(Code)
This is a global counter variable that is handy to use when tracing repetitive tasks.



out
public static PrintStream out(Code)





Method Detail
disableTraceCategory
public static void disableTraceCategory(String category)(Code)
Disables tracing for the specified category of messages
Parameters:
  category - Remove specified category to disable tracing



disableTraceCategory
public static void disableTraceCategory(Class category)(Code)
Disables tracing for the specified category of messages
Parameters:
  category - Remove specified category to disable tracing



enableTraceCategory
public static void enableTraceCategory(String category)(Code)
This enables tracing for the specified category of messages
Parameters:
  category - Enable tracing of this category



enableTraceCategory
public static void enableTraceCategory(Class category)(Code)
This enables tracing for the specified category of messages
Parameters:
  category - Enable tracing of this category



flush
public static boolean flush()(Code)
Flushes the Trace.out stream true



isOutputEnabled
public static boolean isOutputEnabled()(Code)



printStackTrace
public static boolean printStackTrace()(Code)
Prints a stack trace of the current thread to the Trace.out stream. true



printStackTrace
public static boolean printStackTrace(Throwable t)(Code)
Prints the specified exception stack trace to the Trace.out stream.
Parameters:
  t - Source Throwable to print a stack trace from true



setOutputEnabled
public static void setOutputEnabled(boolean enabled)(Code)
turns on/off tracing for all categories
Parameters:
  enabled - true to enable tracing, false to disable it



setOutputStream
public static void setOutputStream(PrintStream log)(Code)
Sets the output stream to be used for tracing. This will assign the static Trace.out variable.
Parameters:
  log - The PrintStream to use for Trace.out



trace
public static boolean trace(String category, String message)(Code)
Sends a message to Trace.out if the category is enabled and global output is enabled
Parameters:
  category - Category to which this message belongs
Parameters:
  message - Message to print if the category is enabled true



trace
public static boolean trace(Class category, String message)(Code)
Sends a message to Trace.out if the category is enabled and global output is enabled
Parameters:
  category - Category to which this message belongs
Parameters:
  message - Message to print if the category is enabled true



trace
public static boolean trace(String category, Throwable t)(Code)
Prints a stack trace to Trace.out if the category is enabled and global output is enabled
Parameters:
  category - Category to which this message belongs
Parameters:
  t - Throwable for stack trace to print true



trace
public static boolean trace(Class category, Throwable t)(Code)
Prints a stack trace to Trace.out if the category is enabled and global output is enabled
Parameters:
  category - Category to which this message belongs
Parameters:
  t - Throwable for stack trace to print true



warnTrace
public static boolean warnTrace(String category, boolean condition, String message)(Code)
Print the specified text to Trace.out if the specified category is enabled, and specified condition evaluates to true, and global output is enabled
Parameters:
  category - Category to which this message belongs
Parameters:
  condition - If this evaluates to true, the message will be printed
Parameters:
  message - Message to print if the category is enabled and the condition evals to true true



warnTrace
public static boolean warnTrace(Class category, boolean condition, String message)(Code)
Prints the specified message to Trace.out if the specified category is enabled and specified condition evaluates to true, and global output is enabled
Parameters:
  category - Category to which this message belongs
Parameters:
  condition - If this evaluates to true, the message will be printed
Parameters:
  message - Message to print if the category is enabled and the condition evals to true true



warnTrace
public static boolean warnTrace(String category, String message)(Code)
Prints the specified message to Trace.out if the specified category is enabled and global output is enabled
Parameters:
  category - Category to which this message belongs
Parameters:
  message - Message to print if the category is enabled true



warnTrace
public static boolean warnTrace(Class category, String message)(Code)
Prints the specified message to Trace.out if the specified category is enabled and global output is enabled
Parameters:
  category - Category to which this message belongs
Parameters:
  message - Message to print if the category is enabled true



Fields inherited from org.netbeans.modules.visualweb.extension.openide.util.TraceBase
final public static boolean OFF(Code)(Java Doc)
final public static boolean ON(Code)(Java Doc)


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.