Package: org.codehaus.groovy.ast

## [Java] Class GenericsType.GenericsTypeName

- org.codehaus.groovy.ast.GenericsType.GenericsTypeName

-     public static class GenericsType.GenericsTypeName
      extends Object

  Represents the name of a GenericsType for use as a map key. Equality and hashing are name-only: that is the JLS 6.4.1 in-scope lookup rule and the JVMS 4.7.9.1 `TypeVariableSignature` spelling.

  Type-variable identity (class `T` vs method `T`) lives on GenericsType.getGenericDeclaration, not on this key. Do not add a declaring class to `equals`/`hashCode`: mixed null-owner keys are not an equivalence, and substitution maps that mean "in this scope, name T means String" would stop matching uses.

- - ### Constructor Summary

    Constructors
    Constructor and description
    `GenericsTypeName(String name)` Creates a generics type name with the specified string.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public boolean` | `equals(Object that)` Compares this GenericsTypeName with another object for equality based on the type name.
    `` | `public String` | `getName()` Returns the generic type name.
    `` | `public int` | `hashCode()` Returns the hash code based on the type name.
    `` | `public String` | `toString()` Returns the string representation of this generics type name.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### public GenericsTypeName(String name)

      Creates a generics type name with the specified string.

      throws:
        NullPointerException if name is null
      Parameters:
        `name` - the generic type name (never null)

  - ### Method Detail

    - #### public boolean equals(Object that)

      Compares this GenericsTypeName with another object for equality based on the type name.

      Parameters:
        `that` - the object to compare with
      Returns:
        true if both objects are GenericsTypeNames with equal names

    - #### public String getName()

      Returns the generic type name.

      Returns:
        the name

    - #### public int hashCode()

      Returns the hash code based on the type name.

      Returns:
        the hash code

    - #### public String toString()

      Returns the string representation of this generics type name.

      Returns:
        the name