Class RouteTarget

java.lang.Object
com.vaadin.flow.router.internal.RouteTarget
All Implemented Interfaces:
Serializable

public class RouteTarget extends Object implements Serializable
Route target stores the target component and parent layouts.

For internal use only. May be renamed or removed in a future release.

Since:
1.0
See Also:
  • Constructor Details

    • RouteTarget

      public RouteTarget(Class<? extends Component> target, List<Class<? extends RouterLayout>> parents)
      Create a new Route target holder with the given target registered.
      Parameters:
      target - navigation target
      parents - parent layout chain
    • RouteTarget

      public RouteTarget(Class<? extends Component> target)
      Create a new Route target holder with the given target registered and empty parent layouts.
      Parameters:
      target - navigation target
  • Method Details

    • getTarget

      public Class<? extends Component> getTarget()
      Get the component route target.
      Returns:
      component navigation target.
    • containsTarget

      public boolean containsTarget(Class<? extends Component> target)
      Check if navigation target is present in current target.
      Parameters:
      target - navigation target to check for
      Returns:
      true if navigation target is present in current target.
    • getParentLayouts

      public List<Class<? extends RouterLayout>> getParentLayouts()
      Get the parent layout chain.
      Returns:
      parent layout chain