javax.faces
Class TestUtil

java.lang.Object
  extended by javax.faces.TestUtil

public class TestUtil
extends java.lang.Object


Field Summary
static boolean keepWaiting
           
 
Constructor Summary
TestUtil()
           
 
Method Summary
static boolean equalsWithNulls(java.lang.Object s1, java.lang.Object s2)
          If both args are null, return true.
static java.lang.String printTree(UIComponent root)
          Output of printTree() as a String.
static void printTree(UIComponent root, java.io.PrintStream out)
          Output of printTree() to a PrintStream.
static void printTree(UIComponent root, java.io.Writer out)
           
static void waitForDebugger()
          Usage:
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

keepWaiting

public static boolean keepWaiting
Constructor Detail

TestUtil

public TestUtil()
Method Detail

waitForDebugger

public static void waitForDebugger()
Usage:

Place a call to this method in the earliest possible entry point of your servlet app. It will cause the app to enter into an infinite loop, sleeping until the static var keepWaiting is set to false. The idea is that you attach your debugger to the servlet, then, set a breakpont in this method. When it is hit, you use the debugger to set the keepWaiting class var to false.


equalsWithNulls

public static boolean equalsWithNulls(java.lang.Object s1,
                                      java.lang.Object s2)

If both args are null, return true.

If both args are non-null, return s1.equals(s2)

.

Otherwise, return false.


printTree

public static java.lang.String printTree(UIComponent root)
Output of printTree() as a String. Useful when used with a Logger. For example: logger.log(DebugUtil.printTree(root));


printTree

public static void printTree(UIComponent root,
                             java.io.PrintStream out)
Output of printTree() to a PrintStream. Usage: DebugUtil.printTree(root, System.out);


printTree

public static void printTree(UIComponent root,
                             java.io.Writer out)


Copyright 2002-2011 Oracle America Inc, Inc. All Rights Reserved.