| java.lang.Object biz.hammurapi.util.BeanVisitable
BeanVisitable | public class BeanVisitable implements Visitable(Code) | | Wraps bean into visitable. Children are inferred from: - getXXX methods which
- Are declared in classes which belong to one of root packages or its sub-packages
- Have return type either collection or class (including arrays) belonging to one of root packages or its subpackages.
- Public fields of type belonging to one of root packages or subpackages (including arrays) or of collection type.
author: Pavel Vlasov |
BeanVisitable | public BeanVisitable(Object bean, String rootPackage)(Code) | | Parameters: bean - Bean to visit Parameters: rootPackage - Package for child classes to visit. |
BeanVisitable | public BeanVisitable(Object bean, String[] rootPackages)(Code) | | Parameters: bean - Bean to visit Parameters: rootPackages - Packages for child classes to visit. |
BeanVisitable | protected BeanVisitable(Object bean, String[] rootPackages, Map trace, Map parentMap)(Code) | | This constructor is used by BeanVisitable itself to wrap children into visitable.
Parameters: bean - Bean to visit Parameters: rootPackages - Package for child classes to visit. |
getIdentity | public Integer getIdentity()(Code) | | System hash code of underlying bean |
getPath | public Object[] getPath(Object obj)(Code) | | Path from given object to the root of the model, the given object included. |
handleAccessError | protected void handleAccessError(Field field, Exception e)(Code) | | Prints stack trace to System.err. Override if necessary
Parameters: field - Parameters: e - |
handleAccessError | protected void handleAccessError(Method method, Exception e)(Code) | | Prints stack trace to System.err. Override if necessary
Parameters: method - Parameters: e - |
inTheRightPackage | protected boolean inTheRightPackage(Class clazz)(Code) | | |
wrap | protected Visitable wrap(Object child)(Code) | | Wraps child into Visitable and updates path.
If child is already instance of Visitable it is returned as is and path is not
updated.
Parameters: child - |
|
|