- java.lang.Object
-
- org.eclipse.yasson.internal.model.Property
-
public class Property extends Object
Property of a class, field, getter and setter methods (javabean alike). Used during class model initialization, than dereferenced.
-
-
Constructor Summary
Constructors Constructor Description Property(String name, JsonbAnnotatedElement<Class<?>> declaringClassModel)Create instance of property.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonbAnnotatedElement<Class<?>>getDeclaringClassElement()Class element with annotation under construction for declaring class of this property.FieldgetField()Fieldrepresenting property if any.JsonbAnnotatedElement<Field>getFieldElement()Element with field and its annotations.MethodgetGetter()Methodrepresenting getter of a property if any.JsonbAnnotatedElement<Method>getGetterElement()Element with getter and its annotations.StringgetName()Name of a property, java bean convention.TypegetPropertyType()Extracts type from first not null element: Field, Getter, Setter.MethodgetSetter()Methodrepresenting setter of a property if any.JsonbAnnotatedElement<Method>getSetterElement()Element with setter and its annotations.voidsetField(Field field)voidsetGetter(Method getter)voidsetSetter(Method setter)
-
-
-
Constructor Detail
-
Property
public Property(String name, JsonbAnnotatedElement<Class<?>> declaringClassModel)
Create instance of property.- Parameters:
name- not nulldeclaringClassModel- Class model for a class declaring property.
-
-
Method Detail
-
getName
public String getName()
Name of a property, java bean convention.- Returns:
- name
-
setField
public void setField(Field field)
- Parameters:
field- field not null
-
getGetter
public Method getGetter()
Methodrepresenting getter of a property if any.- Returns:
- getter if present
-
setGetter
public void setGetter(Method getter)
- Parameters:
getter- not null
-
getSetter
public Method getSetter()
Methodrepresenting setter of a property if any.- Returns:
- setter if present
-
setSetter
public void setSetter(Method setter)
- Parameters:
setter- setter not null
-
getDeclaringClassElement
public JsonbAnnotatedElement<Class<?>> getDeclaringClassElement()
Class element with annotation under construction for declaring class of this property. This ClassModel is not fully initialized yet.- Returns:
- ClassModel
-
getPropertyType
public Type getPropertyType()
Extracts type from first not null element: Field, Getter, Setter.- Returns:
- type of a property
-
getFieldElement
public JsonbAnnotatedElement<Field> getFieldElement()
Element with field and its annotations.- Returns:
- field with annotations
-
getGetterElement
public JsonbAnnotatedElement<Method> getGetterElement()
Element with getter and its annotations.- Returns:
- getter with annotations
-
getSetterElement
public JsonbAnnotatedElement<Method> getSetterElement()
Element with setter and its annotations.- Returns:
- setter with annotations
-
-