Interface ListType

  • All Superinterfaces:
    Serializable, Type
    All Known Implementing Classes:

    public interface ListType
    extends Type
    A list of typed objects.

    The List type can validate java array and/or java Collection.

    • Method Detail

      • getFieldType

        Type getFieldType()
        Get the field describing the element type the list accept.
        the field describing the list element types
      • getFieldName

        String getFieldName()
        The field name if any was specified.

        This is used to more for outputting the list as XML and for compatibility with XSD.

        the field name
      • getField

        Field getField()
        Get the field defining the elements stored by this list.
        the field
      • getMinCount

        int getMinCount()
        Gets the required minimum count of elements in this list.
        the minimum count of required elements
      • getMaxCount

        int getMaxCount()
        Gets the required maximum count of allowed elements in this list.
        the maximum count of allowed elements
      • getDefaultValue

        Object getDefaultValue()
        Gets the default value of the list elements, if any.
        the default value or null if none
      • setLimits

        void setLimits​(int minOccurs,
                       int maxOccurs)
        Sets list limits.
      • isArray

        boolean isArray()
        Whether the instances of this list are arrays.
      • isScalarList

        boolean isScalarList()
        This method is provided for compatibility. Existing code is mapping scalar lists to arrays but this should be changed in order to map only explicit scalar list (those declared using xs:list) to arrays and not all list that have scalar items.
        true if the list items are of a scalar type TODO FIXME XXX remove the method and use instead isArray