com.generationjava.beans
Class AbstractBeanViewer

java.lang.Object
  |
  +--com.generationjava.beans.AbstractBeanViewer
Direct Known Subclasses:
BeanMap, DelegatableBeanViewer, ReflectionBeanViewer

public abstract class AbstractBeanViewer
extends java.lang.Object

Helps us deal with such wonderful things as array notation and object notation. Array notation may use associative array notation.


Constructor Summary
AbstractBeanViewer()
           
 
Method Summary
 java.lang.Object get(java.lang.Object key, java.lang.Object myBean)
          Get the property of myBean with the name of the key's toString.
 java.lang.Object handleGet(BeanViewRuntime runtime, java.lang.Object bean, java.lang.String name)
          Give a bean, and a String name, get the property with that name from the bean.
abstract  java.lang.Object invokeGet(BeanViewRuntime runtime, java.lang.Object bean, java.lang.String name, java.lang.Object idx)
          Get a value from a bean with the specified name.
abstract  void invokeSet(BeanViewRuntime runtime, java.lang.Object bean, java.lang.String name, java.lang.Object idx, java.lang.Object value)
           
 java.lang.Object set(java.lang.Object key, java.lang.Object bean, java.lang.Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractBeanViewer

public AbstractBeanViewer()
Method Detail

get

public java.lang.Object get(java.lang.Object key,
                            java.lang.Object myBean)
Get the property of myBean with the name of the key's toString. The key may use dotted notation to imply a property in a property and array notation to get the nth property in a list of propertys.


handleGet

public java.lang.Object handleGet(BeanViewRuntime runtime,
                                  java.lang.Object bean,
                                  java.lang.String name)
Give a bean, and a String name, get the property with that name from the bean. Does not handle dot notation, but does handle array notation and associative array notation.


invokeGet

public abstract java.lang.Object invokeGet(BeanViewRuntime runtime,
                                           java.lang.Object bean,
                                           java.lang.String name,
                                           java.lang.Object idx)
Get a value from a bean with the specified name. If the bean is indexed, an int index is passed. Else it is -1. It is recommmended that implementors of this method use the index method to handle the array notation.


set

public java.lang.Object set(java.lang.Object key,
                            java.lang.Object bean,
                            java.lang.Object value)

invokeSet

public abstract void invokeSet(BeanViewRuntime runtime,
                               java.lang.Object bean,
                               java.lang.String name,
                               java.lang.Object idx,
                               java.lang.Object value)


Copyright © 2000-2003 GenerationJava. All Rights Reserved.