Class BeanProperty
- java.lang.Object
-
- com.oracle.coherence.io.json.genson.reflect.BeanProperty
-
- Direct Known Subclasses:
PropertyAccessor,PropertyMutator
public abstract class BeanProperty extends Object
Represents a bean property, in practice it can be an object field, method (getter/setter) or constructor parameter.- Author:
- Eugen Cepoi
-
-
Field Summary
Fields Modifier and Type Field Description protected Annotation[]annotationsprotected Class<?>concreteClassprotected Class<?>declaringClassprotected intmodifiersprotected Stringnameprotected Typetype
-
Constructor Summary
Constructors Modifier Constructor Description protectedBeanProperty(String name, Type type, Class<?> declaringClass, Class<?> concreteClass, Annotation[] annotations, int modifiers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]aliases()<T extends Annotation>
TgetAnnotation(Class<T> annotationClass)Class<?>getConcreteClass()Class<?>getDeclaringClass()intgetModifiers()StringgetName()The name of this property (not necessarily the original one).Class<?>getRawClass()TypegetType()
-
-
-
Field Detail
-
name
protected final String name
-
type
protected final Type type
-
declaringClass
protected final Class<?> declaringClass
-
concreteClass
protected final Class<?> concreteClass
-
annotations
protected Annotation[] annotations
-
modifiers
protected final int modifiers
-
-
Constructor Detail
-
BeanProperty
protected BeanProperty(String name, Type type, Class<?> declaringClass, Class<?> concreteClass, Annotation[] annotations, int modifiers)
-
-
Method Detail
-
getDeclaringClass
public Class<?> getDeclaringClass()
- Returns:
- The class in which this property is declared
-
getConcreteClass
public Class<?> getConcreteClass()
- Returns:
- The final concrete class from which this property has been resolved. For example if this property is defined in class Root but was resolved for class Child extends Root, then getConcreteClass would return Child class and getDeclaringClass would return Root class.
-
getName
public String getName()
The name of this property (not necessarily the original one).
-
getType
public Type getType()
- Returns:
- the type of the property
-
getRawClass
public Class<?> getRawClass()
-
getModifiers
public int getModifiers()
-
aliases
public String[] aliases()
-
getAnnotation
public <T extends Annotation> T getAnnotation(Class<T> annotationClass)
-
-