Class NameMapper


  • public class NameMapper
    extends java.lang.Object
    This class maps between xml and java names.
    Since:
    1.0 Nov 22, 2005
    Version:
    1.0
    Author:
    http://cheenath
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.util.HashSet<java.lang.String> keywords  
    • Constructor Summary

      Constructors 
      Constructor Description
      NameMapper()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getClassName​(java.lang.String name)
      return the class name for the specified xml type.
      static java.lang.String getFieldName​(java.lang.String name)  
      static java.lang.String getMethodName​(java.lang.String name)
      return the method name for the specified field name.
      static java.lang.String getPackageName​(java.lang.String targetNamespace, java.lang.String packagePrefix)
      returns the java package name for the specified schema target namespace
      • Methods inherited from class java.lang.Object

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

      • keywords

        public static final java.util.HashSet<java.lang.String> keywords
    • Constructor Detail

      • NameMapper

        public NameMapper()
    • Method Detail

      • getPackageName

        public static java.lang.String getPackageName​(java.lang.String targetNamespace,
                                                      java.lang.String packagePrefix)
        returns the java package name for the specified schema target namespace
        Parameters:
        targetNamespace - scheam target namespace
        packagePrefix - package prefix
        Returns:
        java package name
      • getFieldName

        public static java.lang.String getFieldName​(java.lang.String name)
      • getMethodName

        public static java.lang.String getMethodName​(java.lang.String name)
        return the method name for the specified field name.
        Parameters:
        name - field name
        Returns:
        method name. First letter of the method name will be upper case.
      • getClassName

        public static java.lang.String getClassName​(java.lang.String name)
        return the class name for the specified xml type.
        Parameters:
        name - xml complex type
        Returns:
        class name. First letter of the class name will be upper case.