Class Property
java.lang.Object
org.eclipse.yasson.internal.model.Property
Property of a class, field, getter and setter methods (javabean alike).
Used during class model initialization, than dereferenced.
-
Constructor Summary
ConstructorsConstructorDescriptionProperty(String name, JsonbAnnotatedElement<Class<?>> declaringClassModel) Create instance of property. -
Method Summary
Modifier and TypeMethodDescriptionClass element with annotation under construction for declaring class of this property.getField()Fieldrepresenting property if any.Element with field and its annotations.Methodrepresenting getter of a property if any.Element with getter and its annotations.getName()Name of a property, java bean convention.Extracts type from first not null element: Field, Getter, Setter.Methodrepresenting setter of a property if any.Element with setter and its annotations.voidvoidvoid
-
Constructor Details
-
Property
Create instance of property.- Parameters:
name- not nulldeclaringClassModel- Class model for a class declaring property.
-
-
Method Details
-
getName
Name of a property, java bean convention.- Returns:
- name
-
getField
Fieldrepresenting property if any.- Returns:
- field if present
-
setField
- Parameters:
field- field not null
-
getGetter
Methodrepresenting getter of a property if any.- Returns:
- getter if present
-
setGetter
- Parameters:
getter- not null
-
getSetter
Methodrepresenting setter of a property if any.- Returns:
- setter if present
-
setSetter
- Parameters:
setter- setter not null
-
getDeclaringClassElement
Class element with annotation under construction for declaring class of this property. This ClassModel is not fully initialized yet.- Returns:
- ClassModel
-
getPropertyType
Extracts type from first not null element: Field, Getter, Setter.- Returns:
- type of a property
-
getFieldElement
Element with field and its annotations.- Returns:
- field with annotations
-
getGetterElement
Element with getter and its annotations.- Returns:
- getter with annotations
-
getSetterElement
Element with setter and its annotations.- Returns:
- setter with annotations
-