Class TypeVariableInfo

java.lang.Object
online.sharedtype.processor.domain.type.ReferableTypeInfo
online.sharedtype.processor.domain.type.TypeVariableInfo
All Implemented Interfaces:
Serializable, TypeInfo

public final class TypeVariableInfo extends ReferableTypeInfo
Represents a generic type variable.
A type variable refers to a generic type parameter, it has a notation like "T" or bound information like "T extends Number". A type argument is the actual type of the type variable. E.g. "Integer" in "List<Integer>".
Author:
Cause Chung
See Also:
  • Constructor Details

    • TypeVariableInfo

      public TypeVariableInfo()
  • Method Details

    • concatQualifiedName

      public static String concatQualifiedName(String contextTypeQualifiedName, String name)
    • contextTypeQualifiedName

      public String contextTypeQualifiedName()
    • name

      public String name()
    • qualifiedName

      public String qualifiedName()
    • reify

      public TypeInfo reify(Map<TypeVariableInfo,TypeInfo> mappings)
      Description copied from interface: TypeInfo
      Replace type variables with type arguments.
      Parameters:
      mappings - key is a type variable e.g. T value is a type argument, a concrete type e.g. Integer, or a generic type with concrete type parameter, e.g. Tuple<String, String>
      Returns:
      a newly created type info if updated.
    • toString

      public String toString()
      Overrides:
      toString in class Object