Class XSUnsignedShort

    • Field Detail

      • MIN_VALUE

        public static final java.lang.String MIN_VALUE
        A constant holding the minimum value an xsd:unsignedShort can have, 0.
        See Also:
        Constant Field Values
      • MAX_VALUE

        public static final java.lang.String MAX_VALUE
        A constant holding the maximum value an xsd:unsignedShort can have, 65535.
        See Also:
        Constant Field Values
    • Constructor Detail

      • XSUnsignedShort

        public XSUnsignedShort()
        No-arg constructor.
      • XSUnsignedShort

        public XSUnsignedShort​(boolean asWrapper)
        Constructs a new XSUnsignedShort.
        Parameters:
        asWrapper - If true, use the java.lang wrapper class.
    • Method Detail

      • getName

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

        public short getType()
        Returns the type of this XSType.
        Specified by:
        getType in class XSType
        Returns:
        the type 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.
      • getJType

        public JType getJType()
        Returns the JType that this XSType represents.
        Specified by:
        getJType in class XSType
        Returns:
        The JType that this XSType represents.
      • 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.
      • createDefaultValueWithString

        public java.lang.String createDefaultValueWithString​(java.lang.String variableName)
        Creates source code for an additional constructor that deals with default values as specified in the XML schema instance.
        Overrides:
        createDefaultValueWithString in class XSType
        Parameters:
        variableName - Name of the constructor argument.
        Returns:
        Source code for dealing with default values.
      • 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.
      • validationCode

        public void validationCode​(JSourceCode jsc,
                                   java.lang.String fixedValue,
                                   java.lang.String validatorInstanceName)
        Creates the validation code for an instance of this XSType. If necessary the validation code should create a newly configured TypeValidator, that should then be added to a FieldValidator instance whose name is provided.
        Specified by:
        validationCode in class XSType
        Parameters:
        jsc - The JSourceCode to fill in.
        fixedValue - A fixed value to use if any.
        validatorInstanceName - The name of the FieldValidator that the configured TypeValidator should be added to.