org.nuiton.util.decorator
Class Decorator<O>
java.lang.Object
org.nuiton.util.decorator.Decorator<O>
- Type Parameters:
O - the type of data to decorate
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- JXPathDecorator, PropertyDecorator
public abstract class Decorator<O>
- extends Object
- implements Serializable
A simple contract to define a String decorator on any java object.
- Since:
- 2.3
- Author:
- tchemit
- See Also:
- Serialized Form
|
Field Summary |
protected Class<O> |
type
Type of the data to decorate |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
type
protected final Class<O> type
- Type of the data to decorate
Decorator
public Decorator(Class<O> type)
throws NullPointerException
- Throws:
NullPointerException
toString
public abstract String toString(Object bean)
- Parameters:
bean - the bean to decorate
- Returns:
- the string value of the given bean
getType
public Class<O> getType()
getInternalClass
@Deprecated
public Class<O> getInternalClass()
- Deprecated. is remplaced by
getType() and will be removed soon
- Returns:
- the internal type of object that can be decorated by this decorator.
Copyright © 2004-2012 CodeLutin. All Rights Reserved.