Class TypeM

    • Constructor Detail

      • TypeM

        protected TypeM​(java.lang.String name)
      • TypeM

        public TypeM​(java.lang.String packageName,
                     java.lang.String simpleNames)
      • TypeM

        public TypeM​(java.lang.Class<?> aClass)
    • Method Detail

      • withTypeParameter

        public TypeM withTypeParameter​(TypeM... params)
      • getTypeParameters

        public TypeListM getTypeParameters()
      • getSimpleName

        public java.lang.String getSimpleName()
      • getSimpleNames

        public java.lang.String getSimpleNames()
      • getName

        public java.lang.String getName()
      • isPrimitive

        public boolean isPrimitive()
      • isTypeVariable

        public boolean isTypeVariable()
      • isArrayType

        public boolean isArrayType()
      • getPackageName

        public java.lang.String getPackageName()
      • isGeneric

        public boolean isGeneric()
      • getGenericTypeDefinition

        public java.lang.String getGenericTypeDefinition()
        Returns a String representation of the complete generics definition of this type. This can be used for generic parameter definitions of classes and methods.

        Named generic types are represented with bounds. To get a minimal representation used for field declarations see getGenericType()

        Example Output: "Map<T extends CharSequence, E extends List<? super Number>>"

        Returns:
        the complete generics definition
      • getGenericType

        public java.lang.String getGenericType()
        Returns a String representation of the minimal generics definition of this type. This can be used for variable, parameter or return types such as field declarations.

        Named generic types are represented without bounds, because they are defined in the class or method signature. To get a representation of the full definition including bounds see getGenericTypeDefinition()

        Example Output: "Map<T, ? extends List<? super Number>>"

        Returns:
        the generic type
      • isInPackage

        public boolean isInPackage​(java.lang.String packageName)
      • hashCode

        public int hashCode()
        This hashCode() implementation doesn't use typeParameters to avoid a potential StackOverflowError. The equals(Object) implementation does use that field.
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object