org.jboss.services.deployment
Class ContextHelper
java.lang.Object
org.jboss.services.deployment.ContextHelper
public final class ContextHelper
- extends Object
Helper class to pass in to velocity templates and
do things that are more easily performed in java code.
- Version:
- $Revision: 57210 $
- Author:
- Dimitris Andreadis
Method Summary |
static boolean |
isDefined(Object obj)
Convenience method to find out if a variable is defined (not null). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ContextHelper
public ContextHelper()
- Default CTOR
isDefined
public static boolean isDefined(Object obj)
- Convenience method to find out if a variable is defined (not null).
This helps particularly to check if a Boolean variable has been
passed to the velocity context, since the #if( $boolean )
construct is only satisfied, if the value both exists and is true.
- Parameters:
obj
- any object
- Returns:
- true if the object is not null, false otherwise
Copyright © 2002 JBoss Group, LLC. All Rights Reserved.