T
- The class type that this metadata applies to.public class BeanMeta<T> extends Object
BeanInfo
).
@Bean
annotation
is present on the class, or the class has a BeanFilter
registered with it in the bean context,
then that information is used to determine the properties on the class.
Otherwise, the BeanInfo
functionality in Java is used to determine the properties on the class.
@Bean
annotation is specified on class, then the order is the same as the list of properties
in the annotation.
@Bean
annotation is not specified on the class, then the order is based on the following.
Class.getFields()
).
BeanInfo.getPropertyDescriptors()
.
@Beanp
annotation defined on them.
The order can also be overridden through the use of an BeanFilter
.
Modifier and Type | Field and Description |
---|---|
protected BeanFilter |
beanFilter
Optional bean filter associated with the target class.
|
protected Class<T> |
c
The target class that this meta object describes.
|
protected ClassMeta<T> |
classMeta
The target class type that this meta object describes.
|
protected ConstructorInfo |
constructor
The constructor for this bean.
|
protected String[] |
constructorArgs
For beans with constructors with Beanc annotation, this is the list of constructor arg properties.
|
protected BeanContext |
ctx
The bean context that created this metadata object.
|
protected Map<Method,String> |
getterProps
The getter properties on the target class.
|
protected Map<String,BeanPropertyMeta> |
properties
The properties on the target class.
|
protected Map<Method,String> |
setterProps
The setter properties on the target class.
|
protected Map<Class<?>,Class<?>[]> |
typeVarImpls
Type variables implemented by this bean.
|
Modifier | Constructor and Description |
---|---|
protected |
BeanMeta(ClassMeta<T> classMeta,
BeanContext ctx,
BeanFilter beanFilter,
String[] pNames)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
ClassMeta<T> |
getClassMeta()
Returns the
ClassMeta of this bean. |
String |
getDictionaryName()
Returns the dictionary name for this bean as defined through the
@Bean(typeName) annotation. |
BeanPropertyMeta |
getPropertyMeta(String name)
Returns metadata about the specified property.
|
Collection<BeanPropertyMeta> |
getPropertyMetas()
Returns the metadata on all properties associated with this bean.
|
Collection<BeanPropertyMeta> |
getPropertyMetas(String... pNames)
Returns the metadata on the specified list of properties.
|
BeanPropertyMeta |
getTypeProperty()
Returns a mock bean property that resolves to the name
|
int |
hashCode() |
protected T |
newBean(Object outer)
Creates a new instance of this bean.
|
String |
toString() |
protected final ClassMeta<T> classMeta
protected final Map<String,BeanPropertyMeta> properties
protected final Map<Method,String> getterProps
protected final Map<Method,String> setterProps
protected final BeanContext ctx
protected final BeanFilter beanFilter
protected final Map<Class<?>,Class<?>[]> typeVarImpls
protected final ConstructorInfo constructor
protected final String[] constructorArgs
protected BeanMeta(ClassMeta<T> classMeta, BeanContext ctx, BeanFilter beanFilter, String[] pNames)
classMeta
- The target class.ctx
- The bean context that created this object.beanFilter
- Optional bean filter associated with the target class. Can be pNames
- Explicit list of property names and order of properties. If @BeanIgnore public final ClassMeta<T> getClassMeta()
ClassMeta
of this bean.ClassMeta
of this bean.public final String getDictionaryName()
@Bean(typeName)
annotation.public final BeanPropertyMeta getTypeProperty()
public Collection<BeanPropertyMeta> getPropertyMetas()
public Collection<BeanPropertyMeta> getPropertyMetas(String... pNames)
pNames
- The list of properties to retrieve. If public BeanPropertyMeta getPropertyMeta(String name)
name
- The name of the property on this bean.protected T newBean(Object outer) throws ExecutableException
outer
- The outer object if bean class is a non-static inner member class.ExecutableException
- Exception occurred on invoked constructor/method/field.Copyright © 2016–2020 The Apache Software Foundation. All rights reserved.