Interface ResourceDirLauncherIcon
- All Superinterfaces:
LauncherIcon
- All Known Implementing Classes:
ResourceDirLauncherIcon.Stub
public sealed interface ResourceDirLauncherIcon
extends LauncherIcon
permits ResourceDirLauncherIcon.Stub
Custom application launcher icon sourced from the resource directory.
Use create(String) method to create an instance of this type.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordDefault implementation ofResourceDirLauncherIcontype. -
Method Summary
Modifier and TypeMethodDescriptionstatic ResourceDirLauncherIconCreates object of typeResourceDirLauncherIconfrom the name of the resource referencing an icon file in the resource directory.static Optional<ResourceDirLauncherIcon> fromLauncherIcon(LauncherIcon icon) Returns the given icon asResourceDirLauncherIcontype or an emptyOptionalinstance if the given icon object is not an instance ofResourceDirLauncherIcontype.name()Returns name of the resource referencing an icon file in the resource directory.
-
Method Details
-
name
String name()Returns name of the resource referencing an icon file in the resource directory.- Returns:
- name of the resource referencing an icon file in the resource directory
-
fromLauncherIcon
Returns the given icon asResourceDirLauncherIcontype or an emptyOptionalinstance if the given icon object is not an instance ofResourceDirLauncherIcontype.- Parameters:
icon- application launcher icon object ornull- Returns:
- the given icon as
ResourceDirLauncherIcontype or an emptyOptionalinstance
-
create
Creates object of typeResourceDirLauncherIconfrom the name of the resource referencing an icon file in the resource directory.- Parameters:
name- name of the resource referencing an icon file in the resource directory- Returns:
ResourceDirLauncherIconinstance
-