public class WidgetFactoryUtils extends Object
Modifier and Type | Method and Description |
---|---|
static String |
getClassNameFromGroupAndWidgetName(String widgetGroup,
String widgetName,
String packagePrefix)
Create the full qualified widget class name from widget group and widget name.
|
static Pair<String,String> |
getGroupAndWidgetNameFromClass(Class<? extends Widget> widgetClass)
Returns the same as
getGroupAndWidgetNameFromClass(Class, String) with startAfter
set to ".widgets.". |
static Pair<String,String> |
getGroupAndWidgetNameFromClass(Class<? extends Widget> widgetClass,
String startAfter)
Get the widget group and widget name from the full qualified class name of a widget class.
|
public static String getClassNameFromGroupAndWidgetName(String widgetGroup, String widgetName, String packagePrefix)
widgetGroup
- the name of the group.widgetName
- the name of the widgetpackagePrefix
- if provided the prefix is prepended to the class-name. Must end with a dot if not
null.public static Pair<String,String> getGroupAndWidgetNameFromClass(Class<? extends Widget> widgetClass)
getGroupAndWidgetNameFromClass(Class, String)
with startAfter
set to ".widgets.".widgetClass
- the class of the widgetpublic static Pair<String,String> getGroupAndWidgetNameFromClass(Class<? extends Widget> widgetClass, String startAfter)
widgetClass
- the widget classstartAfter
- an optional string to start after when extracting the group and widget. The first
occurrence of this string is searched in the package name of the class and if
found only the substring following this string is used for extraction.Copyright © 2019 Communote team. All rights reserved.