public interface IBean
IIdedBean
Modifier and Type | Method and Description |
---|---|
void |
buildDevString(java.lang.StringBuilder b)
Builds a string representation of the bean using the public
getXXX() methods. |
<T extends IBean> |
cloneBean()
Clones this bean.
|
int |
getBeanVer()
Returns the bean instance version.
|
int getBeanVer()
<T extends IBean> T cloneBean()
T
- dynamic type of the bean to returnvoid buildDevString(java.lang.StringBuilder b)
getXXX()
methods.
The string representation will contain the short class name, and the string representation of the properties returned by the public getXXX()
methods.
Only getXXX()
methods that take 0 arguments and have a non-void return type will be included. Object.getClass()
will be excluded.
Moreover getXXX()
methods annotated with the HiddenProperty
annotation are also excluded.
If a getXXX()
method returns an instance of IBean
, then its buildDevString(StringBuilder)
method will be used to get its
string representation.
Note: This is an effective way to build string representation of IBean
s because the same string builder is shared and passed on to the
child beans to build.
Note #2: If a getXXX()
method returns this
, then the string "this"
is appended. Other than this case,
circular references are not detected and will result in a StackOverflowError
(e.g. if a
and a2
are equals in the
following case: ABean a; BBean b=a.getB(); ABean a2=b.getA();
).
b
- string builder to append the string representation of the bean to
This API documentation is public and is intended for / allowed to be used by anyone.
Scelight home page: https://sites.google.com/site/scelight/
Scelight is a trademark of András Belicza. Copyright © András Belicza, 2013-2015. All rights reserved.