com.redspr.beanldom.info
Class BaseInfo
java.lang.Object
|
+--com.redspr.beanldom.info.BaseInfo
- All Implemented Interfaces:
- ClassInfo
- Direct Known Subclasses:
- ArrayInfo, LBeanInfo, ValueInfo
- public abstract class BaseInfo
- extends Object
- implements ClassInfo
Create default behaviour for ClassInfo objects.
- Author:
- Sam Hough
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BaseInfo
public BaseInfo()
getValue
public String getValue(Object target)
- Description copied from interface:
ClassInfo
- convert target to a string. Clients are obliged to use this
method to convert objects of this class to strings if getType
has returned VALUE. Returns null to indicate no value for an
attribute/not text element for element.
- Specified by:
getValue
in interface ClassInfo
getArray
public Object[] getArray(Object target)
- Description copied from interface:
ClassInfo
- called if type == ARRAY.
NB Class of the array is used to determine mapping. Not
class of each object.
- Specified by:
getArray
in interface ClassInfo
getAttributes
public PropertyInfo[] getAttributes()
- Description copied from interface:
ClassInfo
- list of attributes for this class. Return a zero length
array if none.
- Specified by:
getAttributes
in interface ClassInfo
getElements
public PropertyInfo[] getElements()
- Description copied from interface:
ClassInfo
- list of elements for this class. Return a zero length
array if none. NB one entry even for an array.
- Specified by:
getElements
in interface ClassInfo