Class ModelNameUtils


  • public final class ModelNameUtils
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getEnumModel​(YEnumType enumType, java.lang.String packageRoot)
      Gets the enum model class string (including package) to given code.
      static java.lang.String getModel​(YComposedType type, java.lang.String packageRoot)
      Gets the model class string (including package) to given type.
      static java.lang.String getModelName​(YComposedType type)
      Gets the model name (without package) to given type.
      static java.lang.String getModelOrClass​(YAttributeDescriptor attribute, CodeGenerator gen, boolean primitive)
      Gets the model class string to given attribute type if it is a composed type, otherwise the java class string.
      static java.lang.String getModelPackage​(YComposedType type, java.lang.String packageRoot)
      Gets the package of model to given type.
      • Methods inherited from class java.lang.Object

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

      • getModelName

        public static java.lang.String getModelName​(YComposedType type)
        Gets the model name (without package) to given type.
      • getModelPackage

        public static java.lang.String getModelPackage​(YComposedType type,
                                                       java.lang.String packageRoot)
        Gets the package of model to given type.
      • getModel

        public static java.lang.String getModel​(YComposedType type,
                                                java.lang.String packageRoot)
        Gets the model class string (including package) to given type.
      • getEnumModel

        public static java.lang.String getEnumModel​(YEnumType enumType,
                                                    java.lang.String packageRoot)
        Gets the enum model class string (including package) to given code.
      • getModelOrClass

        public static java.lang.String getModelOrClass​(YAttributeDescriptor attribute,
                                                       CodeGenerator gen,
                                                       boolean primitive)
        Gets the model class string to given attribute type if it is a composed type, otherwise the java class string.