T
- the type of the beanpublic class BeanPropertySet<T> extends Object implements PropertySet<T>
PropertySet
that uses reflection to find bean properties.Modifier and Type | Class and Description |
---|---|
static class |
BeanPropertySet.NestedBeanPropertyDefinition<T,V>
Contains properties for a bean type which is nested in another
definition.
|
Modifier and Type | Method and Description |
---|---|
static <T> PropertySet<T> |
get(Class<? extends T> beanType)
Gets a
BeanPropertySet for the given bean type. |
static <T> PropertySet<T> |
get(Class<? extends T> beanType,
boolean checkNestedDefinitions,
PropertyFilterDefinition filterDefinition)
Gets a
BeanPropertySet for the given bean type. |
Class<T> |
getBeanType()
Gets the bean type of this bean property set.
|
Stream<PropertyDefinition<T,?>> |
getProperties()
Gets all known properties as a stream.
|
Optional<PropertyDefinition<T,?>> |
getProperty(String name)
Gets the definition for the named property, or an empty optional if there
is no property with the given name.
|
String |
toString() |
public static <T> PropertySet<T> get(Class<? extends T> beanType)
BeanPropertySet
for the given bean type.T
- the type of the beanbeanType
- the bean type to get a property set for, not null
null
public static <T> PropertySet<T> get(Class<? extends T> beanType, boolean checkNestedDefinitions, PropertyFilterDefinition filterDefinition)
BeanPropertySet
for the given bean type.T
- the bean type to get a property set forbeanType
- the bean type to get a property set for, not null
checkNestedDefinitions
- whether to scan for nested definitions in beanTypefilterDefinition
- filtering conditions for nested propertiesnull
public Stream<PropertyDefinition<T,?>> getProperties()
PropertySet
getProperties
in interface PropertySet<T>
null
public Optional<PropertyDefinition<T,?>> getProperty(String name) throws IllegalArgumentException
PropertySet
getProperty
in interface PropertySet<T>
name
- the property name to look for, not null
IllegalArgumentException
public Class<T> getBeanType()
Copyright © 2020. All rights reserved.