# FragmentNavigator.Destination

Artifact: [androidx.navigation:navigation-fragment](https://developer.android.com/jetpack/androidx/releases/navigation) [View Source](https://cs.android.com/search?q=file:androidx/navigation/fragment/FragmentNavigator.kt+class:androidx.navigation.fragment.FragmentNavigator.Destination) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigation#1.0.0)

*** ** * ** ***


```
@NavDestination.ClassType(value = Fragment)
public class FragmentNavigator.Destination extends NavDestination
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [androidx.navigation.NavDestination](https://developer.android.com/reference/androidx/navigation/NavDestination) ||
|   | ↳ | [androidx.navigation.fragment.FragmentNavigator.Destination](https://developer.android.com/reference/androidx/navigation/fragment/FragmentNavigator.Destination) |

Known direct subclasses [DynamicFragmentNavigator.Destination](https://developer.android.com/reference/androidx/navigation/dynamicfeatures/fragment/DynamicFragmentNavigator.Destination)

|---|---|
| `https://developer.android.com/reference/androidx/navigation/dynamicfeatures/fragment/DynamicFragmentNavigator.Destination` | Destination for dynamic feature navigator. |

*** ** * ** ***

NavDestination specific to `https://developer.android.com/reference/androidx/navigation/fragment/FragmentNavigator`

Construct a new fragment destination. This destination is not valid until you set the Fragment via `https://developer.android.com/reference/androidx/navigation/fragment/FragmentNavigator.Destination#setClassName(kotlin.String)`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/navigation/fragment/FragmentNavigator.Destination#Destination(androidx.navigation.Navigator)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/Navigator<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/fragment/FragmentNavigator.Destination> fragmentNavigator )` |
| `https://developer.android.com/reference/androidx/navigation/fragment/FragmentNavigator.Destination#Destination(androidx.navigation.NavigatorProvider)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/NavigatorProvider navigatorProvider)` Construct a new fragment destination. |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/navigation/fragment/FragmentNavigator.Destination#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/navigation/fragment/FragmentNavigator.Destination#getClassName()()` The Fragment's class name associated with this destination |
| `int` | `https://developer.android.com/reference/androidx/navigation/fragment/FragmentNavigator.Destination#hashCode()()` |
| `void` | `@https://developer.android.com/reference/androidx/annotation/CallSuper https://developer.android.com/reference/androidx/navigation/fragment/FragmentNavigator.Destination#onInflate(android.content.Context,android.util.AttributeSet)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html context, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/util/AttributeSet.html attrs)` |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/fragment/FragmentNavigator.Destination` | `https://developer.android.com/reference/androidx/navigation/fragment/FragmentNavigator.Destination#setClassName(kotlin.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html className)` Set the Fragment class name associated with this destination |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/navigation/fragment/FragmentNavigator.Destination#toString()()` |

| ### Inherited methods |
|---|
| From [androidx.navigation.NavDestination](https://developer.android.com/reference/androidx/navigation/NavDestination) |---|---| | `final void` | `https://developer.android.com/reference/androidx/navigation/NavDestination#addArgument(kotlin.String,androidx.navigation.NavArgument)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html argumentName, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/NavArgument argument)` | | `final void` | `https://developer.android.com/reference/androidx/navigation/NavDestination#addDeepLink(androidx.navigation.NavDeepLink)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/NavDeepLink navDeepLink)` | | `final void` | `https://developer.android.com/reference/androidx/navigation/NavDestination#addDeepLink(kotlin.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html uriPattern)` | | `final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/navigation/NavDestination#fillInLabel(android.content.Context,android.os.Bundle)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html context, https://developer.android.com/reference/android/os/Bundle.html bundle)` | | `final https://developer.android.com/reference/androidx/navigation/NavAction` | `https://developer.android.com/reference/androidx/navigation/NavDestination#getAction(kotlin.Int)(@https://developer.android.com/reference/androidx/annotation/IdRes int id)` | | `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Map.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/NavArgument>` | `https://developer.android.com/reference/androidx/navigation/NavDestination#getArguments()()` | | `final @https://developer.android.com/reference/androidx/annotation/IdRes int` | `https://developer.android.com/reference/androidx/navigation/NavDestination#getId()()` | | `final https://developer.android.com/reference/java/lang/CharSequence.html` | `https://developer.android.com/reference/androidx/navigation/NavDestination#getLabel()()` | | `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/navigation/NavDestination#getNavigatorName()()` | | `final https://developer.android.com/reference/androidx/navigation/NavGraph` | `https://developer.android.com/reference/androidx/navigation/NavDestination#getParent()()` | | `final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/navigation/NavDestination#getRoute()()` | | `boolean` | `https://developer.android.com/reference/androidx/navigation/NavDestination#hasDeepLink(androidx.navigation.NavDeepLinkRequest)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/NavDeepLinkRequest deepLinkRequest)` | | `boolean` | `https://developer.android.com/reference/androidx/navigation/NavDestination#hasDeepLink(android.net.Uri)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html deepLink)` | | `final void` | `https://developer.android.com/reference/androidx/navigation/NavDestination#putAction(kotlin.Int,androidx.navigation.NavAction)(@https://developer.android.com/reference/androidx/annotation/IdRes int actionId, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/NavAction action)` | | `final void` | `https://developer.android.com/reference/androidx/navigation/NavDestination#putAction(kotlin.Int,kotlin.Int)(@https://developer.android.com/reference/androidx/annotation/IdRes int actionId, @https://developer.android.com/reference/androidx/annotation/IdRes int destId)` | | `final void` | `https://developer.android.com/reference/androidx/navigation/NavDestination#removeAction(kotlin.Int)(@https://developer.android.com/reference/androidx/annotation/IdRes int actionId)` | | `final void` | `https://developer.android.com/reference/androidx/navigation/NavDestination#removeArgument(kotlin.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html argumentName)` | | `final void` | `https://developer.android.com/reference/androidx/navigation/NavDestination#setId(kotlin.Int)(@https://developer.android.com/reference/androidx/annotation/IdRes int value)` | | `final void` | `https://developer.android.com/reference/androidx/navigation/NavDestination#setLabel(kotlin.CharSequence)(https://developer.android.com/reference/java/lang/CharSequence.html value)` | | `final void` | `https://developer.android.com/reference/androidx/navigation/NavDestination#setRoute(kotlin.String)(https://developer.android.com/reference/java/lang/String.html <set-?>)` | |

## Public constructors

### Destination

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigation#1.0.0)

```
public Destination(
    @NonNull Navigator<@NonNull FragmentNavigator.Destination> fragmentNavigator
)
```

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/Navigator<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/fragment/FragmentNavigator.Destination> fragmentNavigator` | The `https://developer.android.com/reference/androidx/navigation/fragment/FragmentNavigator` which this destination will be associated with. Generally retrieved via a `https://developer.android.com/reference/androidx/navigation/NavController`'s `https://developer.android.com/reference/androidx/navigation/NavigatorProvider#getNavigator(java.lang.Class)` method. |

### Destination

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigation#1.0.0)

```
public Destination(@NonNull NavigatorProvider navigatorProvider)
```

Construct a new fragment destination. This destination is not valid until you set the Fragment via `https://developer.android.com/reference/androidx/navigation/fragment/FragmentNavigator.Destination#setClassName(kotlin.String)`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/NavigatorProvider navigatorProvider` | The `https://developer.android.com/reference/androidx/navigation/NavController` which this destination will be associated with. |

## Public methods

### equals

```
public boolean equals(Object other)
```

### getClassName

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigation#1.0.0)

```
public final @NonNull String getClassName()
```

The Fragment's class name associated with this destination

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-state-exception/index.html` | when no Fragment class was set. |

### hashCode

```
public int hashCode()
```

### onInflate

```
@CallSuper
public void onInflate(@NonNull Context context, @NonNull AttributeSet attrs)
```

### setClassName

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigation#1.0.0)

```
public final @NonNull FragmentNavigator.Destination setClassName(@NonNull String className)
```

Set the Fragment class name associated with this destination

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html className` | The class name of the Fragment to show when you navigate to this destination |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/fragment/FragmentNavigator.Destination` | this `https://developer.android.com/reference/androidx/navigation/fragment/FragmentNavigator.Destination` |

### toString

```
public @NonNull String toString()
```