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 or in generic type comparisons. This inner class provides value-based equality and hashing for generic type name matching.

  TODO: In order to distinguish GenericsType with same name, we should add a property to keep the declaring class.

  1. change the signature of constructor GenericsTypeName to `GenericsTypeName(String name, ClassNode declaringClass)`
  2. try to fix all compilation errors(if `GenericsType` has declaringClass property, the step would be a bit easy to fix...)
  3. run all tests to see whether the change breaks anything
  4. if all tests pass, congratulations! but if some tests are broken, try to debug and find why...
  We should find a way to set declaring class for `GenericsType` first, it can be completed at the resolving phase.

- - ### 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