Class TypeConversion


  • public final class TypeConversion
    extends java.lang.Object
    A class used to convert XML Schema SimpleTypes into the appropriate XSType.
    Version:
    $Revision: 7943 $ $Date: 2006-01-21 04:43:28 -0700 (Sat, 21 Jan 2006) $
    Author:
    Keith Visco, Arnaud Blandin
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      protected static class  TypeConversion.TypeNames
      Constants.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static XSType convertType​(java.lang.String javaType)
      Returns the XSType that corresponds to the given javaType.
      XSType convertType​(SimpleType simpleType, boolean useJava50)
      Converts the given Simpletype to the appropriate XSType.
      XSType convertType​(SimpleType simpleType, java.lang.String packageName, boolean useJava50)
      Converts the given Simpletype to the appropriate XSType.
      XSType convertType​(SimpleType simpleType, java.lang.String packageName, boolean useWrapper, boolean useJava50, java.lang.String javaClassBindingName)
      Converts the given Simpletype to the appropriate XSType.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TypeConversion

        public TypeConversion​(BuilderConfiguration config)
        Creates a new TypeConversion instance.
        Parameters:
        config - the BuilderConfiguration instance (must not be null).
    • Method Detail

      • convertType

        public XSType convertType​(SimpleType simpleType,
                                  boolean useJava50)
        Converts the given Simpletype to the appropriate XSType.
        Parameters:
        simpleType - the SimpleType to convert to an XSType instance
        useJava50 - true if source code is to be generated for Java 5
        Returns:
        the XSType which represets the given Simpletype
      • convertType

        public XSType convertType​(SimpleType simpleType,
                                  java.lang.String packageName,
                                  boolean useJava50)
        Converts the given Simpletype to the appropriate XSType.
        Parameters:
        simpleType - the SimpleType to convert to an XSType instance
        packageName - the packageName for any new class types
        useJava50 - true if source code is to be generated for Java 5
        Returns:
        the XSType which represets the given Simpletype
      • convertType

        public XSType convertType​(SimpleType simpleType,
                                  java.lang.String packageName,
                                  boolean useWrapper,
                                  boolean useJava50,
                                  java.lang.String javaClassBindingName)
        Converts the given Simpletype to the appropriate XSType.
        Parameters:
        simpleType - the SimpleType to convert to an XSType instance
        packageName - the packageName for any new class types
        useWrapper - a boolean that when true indicates that primitive wrappers be used instead of the actual primitives (e.g. java.lang.Integer instead of int)
        useJava50 - true if source code is to be generated for Java 5
        javaClassBindingName - valid java Class Name specified by corresponding binding component
        Returns:
        the XSType which represets the given Simpletype
      • convertType

        public static XSType convertType​(java.lang.String javaType)
        Returns the XSType that corresponds to the given javaType.
        Parameters:
        javaType - name of the Java type for which to look up the XSType
        Returns:
        XSType that corresponds to the given javaType