Package org.springframework.aot.hint

# Class JavaSerializationHint

java.lang.Object
org.springframework.aot.hint.JavaSerializationHint

All Implemented Interfaces:
  `ConditionalHint`

public final class JavaSerializationHint extends Object implements ConditionalHint
A hint that describes the need for Java serialization at runtime.

Since:
  6.0
Author:
  Brian Clozel

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static class`
`JavaSerializationHint.Builder`
Builder for `JavaSerializationHint`.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object other)`
`TypeReference`
`getReachableType()`
Return the type that should be reachable for this hint to apply, or `null` if this hint should always been applied.
`TypeReference`
`getType()`
Return the `type` that needs to be serialized using Java serialization at runtime.
`int`
`hashCode()`

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

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

### Methods inherited from interface org.springframework.aot.hint.ConditionalHint

`conditionMatches`

## Method Details

### getType

public TypeReference getType()
Return the `type` that needs to be serialized using Java serialization at runtime.

Returns:
  a `Serializable` type

### getReachableType

@Nullable public TypeReference getReachableType()
Description copied from interface: `ConditionalHint`
Return the type that should be reachable for this hint to apply, or `null` if this hint should always been applied.

Specified by:
  `getReachableType` in interface `ConditionalHint`
Returns:
  the reachable type, if any

### equals

public boolean equals(@Nullable Object other)

Overrides:
  `equals` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`