com.fasterxml.jackson.databind.jsontype

## Class NamedType

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

All Implemented Interfaces:
  Serializable

    public final class NamedType
    extends Object
    implements Serializable

Simple container class for types with optional logical name, used as external identifier

See Also:
  Serialized Form

### Field Summary

Fields
`protected Class<?>` `_class`
`protected int` `_hashCode`
`protected String` `_name`

### Constructor Summary

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

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `equals(Object o)` Equality is defined based on class and name
`String` `getName()`
`Class<?>` `getType()`
`int` `hashCode()`
`boolean` `hasName()`
`void` `setName(String name)`
`String` `toString()`

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

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

### Field Detail

#### _class

    protected final Class<?> _class

#### _hashCode

    protected final int _hashCode

#### _name

    protected String _name

### Constructor Detail

#### NamedType

    public NamedType(Class<?> c)

#### NamedType

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

### Method Detail

#### getType

    public Class<?> getType()

#### getName

    public String getName()

#### setName

    public void setName(String name)

#### hasName

    public boolean hasName()

#### equals

    public boolean equals(Object o)

Equality is defined based on class and name

Overrides:
  `equals` in class `Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`