public final class BeanIntrospector extends Object
java.beans.Introspector that
allows to collect information about annotations.| Modifier and Type | Class and Description |
|---|---|
static class |
BeanIntrospector.Property
Property descriptor.
|
| Modifier and Type | Method and Description |
|---|---|
<A extends Annotation> |
getAnnotation(Class<A> annotationType)
Returns bean annotation for the specified annotation type or
null if annotation is not defined. |
Annotation[] |
getAnnotations()
Returns array of annotations defined on the bean type.
|
static BeanIntrospector |
getInstance(Class<?> type)
Returns
BeanIntrospector instance for the specified type. |
Collection<BeanIntrospector.Property> |
getProperties()
Returns collection of all the properties defined on the bean.
|
BeanIntrospector.Property |
getProperty(String name)
Returns property descriptor for the specified property name or
null if property is not exists. |
Set<String> |
getPropertyNames()
Returns set of property names.
|
Class<?> |
getType()
Returns the type of bean.
|
boolean |
hasAnnotation(Class<? extends Annotation> annotationType)
Determines if this bean type has annotation with the specified type.
|
boolean |
hasProperty(String name)
Determines if this bean type has property with the specified name.
|
String |
toString()
Returns string representing this bean type.
|
public Class<?> getType()
public boolean hasAnnotation(Class<? extends Annotation> annotationType)
annotationType - The type of annotation.true if this bean type has annotation with the
specified type; false otherwise.public <A extends Annotation> A getAnnotation(Class<A> annotationType)
null if annotation is not defined.annotationType - The type of annotation.null if annotation is not defined.public Annotation[] getAnnotations()
public Set<String> getPropertyNames()
public boolean hasProperty(String name)
name - Property name.true if this bean type has property with the
specified name; false otherwise.public BeanIntrospector.Property getProperty(String name)
null if property is not exists.name - Property name.null if property is not exists.public Collection<BeanIntrospector.Property> getProperties()
public String toString()
public static BeanIntrospector getInstance(Class<?> type)
BeanIntrospector instance for the specified type.type - The type of bean.BeanIntrospector instance for the specified type.Copyright © 2010-2012 FoxLabs. All Rights Reserved.