Class XSListType

  • Direct Known Subclasses:
    XSIdRefs, XSList, XSNMTokens

    public abstract class XSListType
    extends XSType
    A base class for all list types.
    Version:
    $Revision: 6678 $ $Date: 2005-12-13 14:58:48 -0700 (Tue, 13 Dec 2005) $
    Author:
    Ralf Joachim
    • Constructor Detail

      • XSListType

        public XSListType​(java.lang.String colType,
                          XSType contentType,
                          boolean useJava50)
        Creates an instance of this (abstract base) collection type.
        Parameters:
        colType - Type of collection to use.
        contentType - Type of the collection members.
        useJava50 - If true, the collection will be generated using Java 5
    • Method Detail

      • getContentType

        public final XSType getContentType()
        Returns the type contained in the list.
        Returns:
        The type contained in the list.
      • getJType

        public JType getJType()
        Returns the JType that this XSType represents.
        Specified by:
        getJType in class XSType
        Returns:
        The JType that this XSType represents.
      • getMaximumSize

        public final int getMaximumSize()
        Returns the maximum allowed size for this list.
        Returns:
        The maximum allowed size for this list.
      • setMaximumSize

        public final void setMaximumSize​(int size)
        Sets the maximum allowed size for this list.
        Parameters:
        size - New maximum size for this list
      • getMinimumSize

        public final int getMinimumSize()
        Returns the minimum allowed size for this list.
        Returns:
        The minimum allowed size for this list.
      • setMinimumSize

        public final void setMinimumSize​(int size)
        Sets the minimum allowed size for this list.
        Parameters:
        size - New minimum size for this list
      • isCollection

        public boolean isCollection()
        Returns true if this XSType represents a collection.
        Overrides:
        isCollection in class XSType
        Returns:
        True if this XSType represents a collection.
      • getName

        public java.lang.String getName()
        Returns the name of this XSType.
        Specified by:
        getName in class XSType
        Returns:
        The name of this XSType.
      • isPrimitive

        public boolean isPrimitive()
        Returns true if this XSType represents a primitive type.
        Specified by:
        isPrimitive in class XSType
        Returns:
        True if this XSType represents a primitive type.
      • isDateTime

        public boolean isDateTime()
        Returns true if the XSType represents an XML Schema date/time type.
        Specified by:
        isDateTime in class XSType
        Returns:
        True if the XSType represents an XML Schema date/time type.
      • newInstanceCode

        public java.lang.String newInstanceCode()
        Returns the Java code neccessary to create a new instance of the JType associated with this XSType.
        Specified by:
        newInstanceCode in class XSType
        Returns:
        The Java code neccessary to create a new instance.
      • createToJavaObjectCode

        public java.lang.String createToJavaObjectCode​(java.lang.String variableName)
        Returns the string necessary to convert an instance of this XSType to an Object. This method is really only useful for primitive types.
        Specified by:
        createToJavaObjectCode in class XSType
        Parameters:
        variableName - The name of the instance variable.
        Returns:
        The String necessary to convert an instance of this XSType to an Object.
      • createFromJavaObjectCode

        public java.lang.String createFromJavaObjectCode​(java.lang.String variableName)
        Returns the string necessary to convert an Object to an instance of this XSType. This method is really only useful for primitive types.
        Specified by:
        createFromJavaObjectCode in class XSType
        Parameters:
        variableName - The name of the Object.
        Returns:
        The String necessary to convert an Object to an instance of this XSType.
      • setFacet

        protected void setFacet​(Facet facet)
        Set the given facet for XSType if applicable.
        Specified by:
        setFacet in class XSType
        Parameters:
        facet - The facet to set for XSType.