|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjfun.yan.etc.Beans
public class Beans
Helper functions for bean component including customizations
of bean property resolution strategy.
The default strategy is byType.
byName, byDisplayName and byQualifiedName are provided in this class directly.
More flexible policies can be implemented by
using the resolveBy(jfun.yan.Component, FromProperty) method.
Codehaus.org.
| Constructor Summary | |
|---|---|
Beans()
|
|
| Method Summary | |
|---|---|
static Component |
beanComponent(Component cc,
java.lang.String[] mandatory_params)
Create a Component that makes the parameters mandatory properties and all java bean setters optional. |
static Component |
byDisplayName(Component cc)
resolve java bean properties by display name instead of the default "byType" policy. |
static Component |
byName(Component cc)
resolve java bean properties by name instead of the default "byType" policy. |
static Component |
byQualifiedName(Component cc)
resolve java bean properties by fully qualified name (class_name.property_name) instead of the default "byType" policy. |
static Component |
byType(Component cc)
resolve java bean properties by type. |
static Component |
resolveBy(Component cc,
java.lang.Class type,
FromProperty pn)
Customize the resolution mechanism for java bean properties using the result from a FromProperty object. |
static Component |
resolveBy(Component cc,
FromProperty pn)
Customize the resolution mechanism for java bean properties using the result from a FromProperty object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Beans()
| Method Detail |
|---|
public static Component resolveBy(Component cc,
java.lang.Class type,
FromProperty pn)
cc - the component.type - the type of the java bean.pn - the FromProperty object.
public static Component resolveBy(Component cc,
FromProperty pn)
cc - the component.pn - the FromProperty object.
public static Component byName(Component cc)
cc - the component.
public static Component byType(Component cc)
cc - the component.
public static Component byDisplayName(Component cc)
cc - the component.
public static Component byQualifiedName(Component cc)
cc - the component.
public static Component beanComponent(Component cc,
java.lang.String[] mandatory_params)
throws java.beans.IntrospectionException
cc - the component that expects some mandatory parameters
(such as a constructor or a static factory method)mandatory_params - the property names to name the parameters.
java.beans.IntrospectionException - When Java Bean Introspection fails.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||