net.sf.sail.core.util
Class SailBeanUtils

java.lang.Object
  extended by net.sf.sail.core.util.SailBeanUtils

public class SailBeanUtils
extends java.lang.Object

Our class of utility functions for Beans and BeanContexts. Everything here is generic to all JavaBean programming. Methods specific to pods go in PodUtils.

Author:
turadg

Constructor Summary
SailBeanUtils()
           
 
Method Summary
static
<T> java.util.Collection<T>
childrenOfType(java.beans.beancontext.BeanContext bc, java.lang.Class<T> type)
           
static java.beans.beancontext.BeanContextServices findServicesContextOf(java.beans.beancontext.BeanContextChild child)
           
static
<T> T
firstChildOfType(java.beans.beancontext.BeanContext bc, java.lang.Class<T> type)
           
static java.awt.Image getLargeBeanIcon(java.lang.Object bean)
           
static java.awt.Image getSmallBeanIcon(java.lang.Object bean)
           
static void printTree(java.io.PrintStream out, int indent, java.util.Collection<?> collection)
           
static java.beans.beancontext.BeanContext resolveBeanContext(java.lang.Object source)
          Helper method to find the BeanContext containing the source
static java.beans.beancontext.BeanContext resolvePod(java.lang.Object source)
          Deprecated. use PodUtils instead
static java.lang.String shortNameOf(java.lang.Class<?> clazz)
          Deprecated. 
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SailBeanUtils

public SailBeanUtils()
Method Detail

printTree

public static void printTree(java.io.PrintStream out,
                             int indent,
                             java.util.Collection<?> collection)

firstChildOfType

public static <T> T firstChildOfType(java.beans.beancontext.BeanContext bc,
                                     java.lang.Class<T> type)

childrenOfType

public static <T> java.util.Collection<T> childrenOfType(java.beans.beancontext.BeanContext bc,
                                                         java.lang.Class<T> type)

getLargeBeanIcon

public static java.awt.Image getLargeBeanIcon(java.lang.Object bean)

getSmallBeanIcon

public static java.awt.Image getSmallBeanIcon(java.lang.Object bean)

shortNameOf

@Deprecated
public static java.lang.String shortNameOf(java.lang.Class<?> clazz)
Deprecated. 


findServicesContextOf

public static java.beans.beancontext.BeanContextServices findServicesContextOf(java.beans.beancontext.BeanContextChild child)

resolveBeanContext

public static java.beans.beancontext.BeanContext resolveBeanContext(java.lang.Object source)
Helper method to find the BeanContext containing the source

Parameters:
source -
Returns:
BeanContext containing the source bean

resolvePod

@Deprecated
public static java.beans.beancontext.BeanContext resolvePod(java.lang.Object source)
Deprecated. use PodUtils instead

Parameters:
source -
Returns:
Pod containing the source bean


Copyright © 2004-2008 TELS Center. All Rights Reserved.