jaxx.runtime.decorator
Class PropertyDecorator<O>
java.lang.Object
jaxx.runtime.decorator.Decorator<O>
jaxx.runtime.decorator.PropertyDecorator<O>
- Type Parameters:
O - type of data to decorate
- All Implemented Interfaces:
- java.io.Serializable
public class PropertyDecorator<O>
- extends Decorator<O>
Simple property decorator based on String.format(String, Object[]) method.
To use it, give him a class and the property name to render.
For example :
Decorator<Object> d = DecoratorUtils.newPropertyDecorator(PropertyDecorator.class,"expressions");
- Since:
- 1.7.2 (was previously
jaxx.runtime.PropertyDecorator)
- Author:
- chemit
- See Also:
Decorator,
Serialized Form
|
Field Summary |
protected java.lang.reflect.Method |
m
|
protected java.lang.String |
property
name of property |
|
Constructor Summary |
protected |
PropertyDecorator(java.lang.Class<O> internalClass,
java.lang.String property)
|
|
Method Summary |
protected java.lang.reflect.Method |
getM()
|
java.lang.String |
getProperty()
|
java.lang.String |
toString(java.lang.Object bean)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
property
protected java.lang.String property
- name of property
m
protected transient java.lang.reflect.Method m
PropertyDecorator
protected PropertyDecorator(java.lang.Class<O> internalClass,
java.lang.String property)
throws java.lang.NullPointerException
- Throws:
java.lang.NullPointerException
toString
public java.lang.String toString(java.lang.Object bean)
- Specified by:
toString in class Decorator<O>
- Parameters:
bean - the bean to decorate
- Returns:
- the string value of the given bean
getProperty
public java.lang.String getProperty()
getM
protected java.lang.reflect.Method getM()
Copyright © 2008-2009 CodeLutin. All Rights Reserved.