Class FullyQualifiedJavaType

java.lang.Object
org.mybatis.generator.api.dom.java.FullyQualifiedJavaType
All Implemented Interfaces:
Comparable<FullyQualifiedJavaType>
Direct Known Subclasses:
PrimitiveTypeWrapper

public class FullyQualifiedJavaType extends Object implements Comparable<FullyQualifiedJavaType>
  • Field Details

    • JAVA_LANG

      private static final String JAVA_LANG
      See Also:
    • intInstance

      private static FullyQualifiedJavaType intInstance
    • stringInstance

      private static FullyQualifiedJavaType stringInstance
    • booleanPrimitiveInstance

      private static FullyQualifiedJavaType booleanPrimitiveInstance
    • objectInstance

      private static FullyQualifiedJavaType objectInstance
    • dateInstance

      private static FullyQualifiedJavaType dateInstance
    • criteriaInstance

      private static FullyQualifiedJavaType criteriaInstance
    • generatedCriteriaInstance

      private static FullyQualifiedJavaType generatedCriteriaInstance
    • baseShortName

      private String baseShortName
      The short name without any generic arguments.
    • baseQualifiedName

      private String baseQualifiedName
      The fully qualified name without any generic arguments.
    • explicitlyImported

      private boolean explicitlyImported
    • packageName

      private String packageName
    • primitive

      private boolean primitive
    • isArray

      private boolean isArray
    • primitiveTypeWrapper

      private PrimitiveTypeWrapper primitiveTypeWrapper
    • typeArguments

      private final List<FullyQualifiedJavaType> typeArguments
    • wildcardType

      private boolean wildcardType
    • boundedWildcard

      private boolean boundedWildcard
    • extendsBoundedWildcard

      private boolean extendsBoundedWildcard
  • Constructor Details

    • FullyQualifiedJavaType

      public FullyQualifiedJavaType(String fullTypeSpecification)
      Use this constructor to construct a generic type with the specified type parameters.
      Parameters:
      fullTypeSpecification - the full type specification
  • Method Details

    • isExplicitlyImported

      public boolean isExplicitlyImported()
    • getFullyQualifiedName

      public String getFullyQualifiedName()
      Returns the fully qualified name - including any generic type parameters.
      Returns:
      Returns the fullyQualifiedName.
    • getFullyQualifiedNameWithoutTypeParameters

      public String getFullyQualifiedNameWithoutTypeParameters()
    • getImportList

      public List<String> getImportList()
      Returns a list of Strings that are the fully qualified names of this type, and any generic type argument associated with this type.
      Returns:
      the import list
    • calculateActualImport

      private String calculateActualImport(String name)
    • getPackageName

      public String getPackageName()
    • getShortName

      public String getShortName()
    • getShortNameWithoutTypeArguments

      public String getShortNameWithoutTypeArguments()
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isPrimitive

      public boolean isPrimitive()
    • getPrimitiveTypeWrapper

      public PrimitiveTypeWrapper getPrimitiveTypeWrapper()
    • getIntInstance

      public static FullyQualifiedJavaType getIntInstance()
    • getNewListInstance

      public static FullyQualifiedJavaType getNewListInstance()
    • getNewHashMapInstance

      public static FullyQualifiedJavaType getNewHashMapInstance()
    • getNewArrayListInstance

      public static FullyQualifiedJavaType getNewArrayListInstance()
    • getNewIteratorInstance

      public static FullyQualifiedJavaType getNewIteratorInstance()
    • getStringInstance

      public static FullyQualifiedJavaType getStringInstance()
    • getBooleanPrimitiveInstance

      public static FullyQualifiedJavaType getBooleanPrimitiveInstance()
    • getObjectInstance

      public static FullyQualifiedJavaType getObjectInstance()
    • getDateInstance

      public static FullyQualifiedJavaType getDateInstance()
    • getCriteriaInstance

      public static FullyQualifiedJavaType getCriteriaInstance()
    • getGeneratedCriteriaInstance

      public static FullyQualifiedJavaType getGeneratedCriteriaInstance()
    • compareTo

      public int compareTo(FullyQualifiedJavaType other)
      Specified by:
      compareTo in interface Comparable<FullyQualifiedJavaType>
    • addTypeArgument

      public void addTypeArgument(FullyQualifiedJavaType type)
    • parse

      private void parse(String fullTypeSpecification)
    • simpleParse

      private void simpleParse(String typeSpecification)
    • genericParse

      private void genericParse(String genericSpecification)
    • getPackage

      private static String getPackage(String baseQualifiedName)
      Returns the package name of a fully qualified type.

      This method calculates the package as the part of the fully qualified name up to, but not including, the last element. Therefore, it does not support fully qualified inner classes. Not totally fool proof, but correct in most instances.

      Parameters:
      baseQualifiedName - the base qualified name
      Returns:
      the package
    • isArray

      public boolean isArray()
    • getTypeArguments

      public List<FullyQualifiedJavaType> getTypeArguments()