com.fasterxml.jackson.databind.jsontype

## Class NamedType

- java.lang.Object
- - com.fasterxml.jackson.databind.jsontype.NamedType

- All Implemented Interfaces:
    java.io.Serializable

      public final class NamedType
      extends java.lang.Object
      implements java.io.Serializable

  Simple container class for types with optional logical name, used as external identifier
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.lang.Class<?>` | `_class`
    `protected int` | `_hashCode`
    `protected java.lang.String` | `_name`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `NamedType(java.lang.Class<?> c)`
    `NamedType(java.lang.Class<?> c, java.lang.String name)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object o)` Equality is defined based on class only, not on name
    `java.lang.String` | `getName()`
    `java.lang.Class<?>` | `getType()`
    `int` | `hashCode()`
    `boolean` | `hasName()`
    `void` | `setName(java.lang.String name)`
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### _class

          protected final java.lang.Class<?> _class

    - #### _hashCode

          protected final int _hashCode

    - #### _name

          protected java.lang.String _name

  - ### Constructor Detail

    - #### NamedType

          public NamedType(java.lang.Class<?> c)

    - #### NamedType

          public NamedType(java.lang.Class<?> c,
                   java.lang.String name)

  - ### Method Detail

    - #### getType

          public java.lang.Class<?> getType()

    - #### getName

          public java.lang.String getName()

    - #### setName

          public void setName(java.lang.String name)

    - #### hasName

          public boolean hasName()

    - #### equals

          public boolean equals(java.lang.Object o)

      Equality is defined based on class only, not on name
      Overrides:
        `equals` in class `java.lang.Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`