Class Property


  • public class Property
    extends java.lang.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​(java.lang.String name, JsonbAnnotatedElement<java.lang.Class<?>> declaringClassModel)
      Create instance of property.
    • Constructor Detail

      • Property

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

      • getName

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

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

        public void setField​(java.lang.reflect.Field field)
        Parameters:
        field - field not null
      • getGetter

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

        public void setGetter​(java.lang.reflect.Method getter)
        Parameters:
        getter - not null
      • getSetter

        public java.lang.reflect.Method getSetter()
        Method representing setter of a property if any.
        Returns:
        setter if present
      • setSetter

        public void setSetter​(java.lang.reflect.Method setter)
        Parameters:
        setter - setter not null
      • getDeclaringClassElement

        public JsonbAnnotatedElement<java.lang.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 java.lang.reflect.Type getPropertyType()
        Extracts type from first not null element: Field, Getter, Setter.
        Returns:
        type of a property
      • getFieldElement

        public JsonbAnnotatedElement<java.lang.reflect.Field> getFieldElement()
        Element with field and its annotations.
        Returns:
        field with annotations
      • getGetterElement

        public JsonbAnnotatedElement<java.lang.reflect.Method> getGetterElement()
        Element with getter and its annotations.
        Returns:
        getter with annotations
      • getSetterElement

        public JsonbAnnotatedElement<java.lang.reflect.Method> getSetterElement()
        Element with setter and its annotations.
        Returns:
        setter with annotations