public class MetaBean extends FeaturesCapable implements Cloneable, Features.Bean
MetaProperty,
Serialized Form| Modifier and Type | Class and Description |
|---|---|
protected static class |
MetaBean.ConstructorComparator |
protected static class |
MetaBean.FieldComparator |
protected static class |
MetaBean.MethodComparator |
DOMAIN, EXECUTABLES, MAIN_KEY, PROPERTIES, UNIQUE_KEY| Constructor and Description |
|---|
MetaBean() |
| Modifier and Type | Method and Description |
|---|---|
void |
addConstructor(Constructor<?> constructor,
MetaConstructor meta) |
void |
addMethod(Method method,
MetaMethod meta) |
protected void |
copyInto(FeaturesCapable target)
Copy this
FeaturesCapable into another FeaturesCapable
instance. |
Class<?> |
getBeanClass()
Get the beanClass.
|
MetaConstructor |
getConstructor(Constructor<?> constructor) |
String |
getId()
Get the id.
|
MetaMethod |
getMethod(Method method) |
MetaMethod[] |
getMethods() |
String |
getName()
Get the name.
|
MetaProperty[] |
getProperties()
Get the properties.
|
MetaProperty |
getProperty(String name)
Get the specified
MetaProperty. |
boolean |
hasRelationships()
Learn whether any known property is a relationship.
|
void |
putProperty(String name,
MetaProperty property)
bidirectional - set the relationship between a MetaProperty and its parentMetaBean
|
MetaBean |
resolveMetaBean(Object bean)
|
void |
setBeanClass(Class<?> beanClass)
Set the beanClass.
|
void |
setId(String id)
Set the id.
|
void |
setName(String name)
Set the name.
|
void |
setProperties(MetaProperty[] properties)
Set the properties.
|
String |
toString() |
addValidation, copy, createFeaturesMap, getFeature, getFeature, getFeatures, getValidations, hasValidation, initFeature, putFeature, setValidationspublic String getId()
public void setId(String id)
id - the String to setpublic String getName()
public void setName(String name)
name - the String to setpublic Class<?> getBeanClass()
public void setBeanClass(Class<?> beanClass)
beanClass - the Class> to setpublic MetaProperty[] getProperties()
public MetaMethod[] getMethods()
public void addMethod(Method method, MetaMethod meta)
public void addConstructor(Constructor<?> constructor, MetaConstructor meta)
public void setProperties(MetaProperty[] properties)
properties - the MetaProperty[] to setpublic MetaProperty getProperty(String name)
MetaProperty.name - property namenullpublic boolean hasRelationships()
MetaProperty.isRelationship()public void putProperty(String name, MetaProperty property)
name - property nameproperty - if null, removeprotected void copyInto(FeaturesCapable target)
FeaturesCapable into another FeaturesCapable
instance.copyInto in class FeaturesCapablepublic MetaBean resolveMetaBean(Object bean)
If this MetaBean is compatible with bean, return this, else null.
Compatibility is satisfied in one of the following ways:
bean is nullbean is an instance of our beanClassbean is our beanClass itselfbean - instancethis or nullpublic MetaMethod getMethod(Method method)
public MetaConstructor getConstructor(Constructor<?> constructor)
Copyright © 2010–2024 The Apache Software Foundation. All rights reserved.