|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.syndication.feed.impl.ToStringBean
public class ToStringBean
Provides deep Bean toString support.
It works on all read/write properties, recursively. It support all primitive types, Strings, Collections, ToString objects and multi-dimensional arrays of any of them.
| Constructor Summary | |
|---|---|
protected |
ToStringBean(java.lang.Class beanClass)
Default constructor. |
|
ToStringBean(java.lang.Class beanClass,
java.lang.Object obj)
Creates a ToStringBean to be used in a delegation pattern. |
| Method Summary | |
|---|---|
java.lang.String |
toString()
Returns the String representation of the bean given in the constructor. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected ToStringBean(java.lang.Class beanClass)
To be used by classes extending ToStringBean only.
beanClass - indicates the class to scan for properties, normally an interface class.
public ToStringBean(java.lang.Class beanClass,
java.lang.Object obj)
For example:
public class Foo implements ToString {
public String toString(String prefix) {
ToStringBean tsb = new ToStringBean(this);
return tsb.toString(prefix);
}
public String toString() {
return toString("Foo");
}
}
beanClass - indicates the class to scan for properties, normally an interface class.obj - object bean to create String representation.| Method Detail |
|---|
public java.lang.String toString()
It uses the Class name as the prefix.
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||