Class DefaultObjectType

    • Method Detail

      • isOrdered

        public boolean isOrdered()
        Description copied from interface: ObjectType
        If the list of fields must respect the order or not
        Specified by:
        isOrdered in interface ObjectType
        Returns:
        True if they must be ordered
      • getOpenRestriction

        public Optional<MetadataType> getOpenRestriction()
        Description copied from interface: ObjectType
        Returns the restriction if any specified for the open type. This restriction applies to the type of the object's fields.
        Specified by:
        getOpenRestriction in interface ObjectType
        Returns:
        The restriction if any
      • getFieldValues

        public Object[] getFieldValues()
        Description copied from interface: FieldsComparable
        A list of the fields that define the identity of this class. These fields can be used to compare if instances of a class are equal, or to generate a hash code for it.

        Have in mind not exposing fields of class Pattern, for example, that only check for reference equality (If that is not the desired behaviour).

        Specified by:
        getFieldValues in interface FieldsComparable
        Overrides:
        getFieldValues in class BaseMetadataType
      • getFieldByName

        public Optional<ObjectFieldType> getFieldByName​(String propertyName)
        Description copied from interface: ObjectType
        Searches a field that matches the specified name
        Specified by:
        getFieldByName in interface ObjectType
        Parameters:
        propertyName - The name of the property
        Returns:
        The field is any
      • accept

        public void accept​(MetadataTypeVisitor visitor)
        Description copied from interface: MetadataType
        Dispatches in a reflective way to the method with prefix "visit" with the specific type as argument. Example visitObject(ObjectType objectType) will be called when this type is an ObjectType.
        Specified by:
        accept in interface MetadataType
        Parameters:
        visitor - The visitor