Class Property

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.
  • Field Details

  • Constructor Details

    • Property

      public Property(String name, JsonbAnnotatedElement<Class<?>> declaringClassModel)
      Create instance of property.
      Parameters:
      name - not null
      declaringClassModel - Class model for a class declaring property.
  • Method Details

    • getName

      public String getName()
      Name of a property, java bean convention.
      Returns:
      name
    • getField

      public Field getField()
      Field representing property if any.
      Returns:
      field if present
    • setField

      public void setField(Field field)
      Parameters:
      field - field not null
    • getGetter

      public Method getGetter()
      Method representing getter of a property if any.
      Returns:
      getter if present
    • setGetter

      public void setGetter(Method getter)
      Parameters:
      getter - not null
    • getSetter

      public Method getSetter()
      Method representing 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
    • getGetterType

      Type getGetterType()
    • getSetterType

      Type getSetterType()
    • 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