Package com._1c.g5.v8.dt.ui.util
Class LabelUtil
java.lang.Object
com._1c.g5.v8.dt.ui.util.LabelUtil
Miscellaneous utilities for obtaining model labels for UI-related purposes.
- Restriction:
- This class is not intended to be sub-classed by clients.
- Restriction:
- This class is not intended to be instantiated by clients.
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
Obtains label for a given object.static String
Obtains path string for a given object.static String
Obtains path string for a given object.static String
Obtains path string for a given object.static String
getPath
(Object object, String pathSeparator, Class<?> stopAfter, int fromIndex, Predicate<Object> filter) Obtains path string for a given object.
-
Method Details
-
getLabel
Obtains label for a given object.- Parameters:
object
- the object to obtain label for, cannot benull
- Returns:
- obtained label or empty string if object has no label, never
null
-
getPath
Obtains path string for a given object.- Parameters:
object
- the object to obtain path for, cannot benull
pathSeparator
- the path separator to use, cannot benull
- Returns:
- obtained path or empty string if object has no path, never
null
-
getPath
Obtains path string for a given object.- Parameters:
object
- the object to obtain path for, cannot benull
pathSeparator
- the path separator to use, cannot benull
stopAfter
- path generation will be stopped after object of this class is encountered among parents ornull
if not needed- Returns:
- obtained path or empty string if object has no path, never
null
-
getPath
public static String getPath(Object object, String pathSeparator, Class<?> stopAfter, int fromIndex) Obtains path string for a given object.- Parameters:
object
- the object to obtain path for, cannot benull
pathSeparator
- the path separator to use, cannot benull
stopAfter
- path generation will be stopped after object of this class is encountered among parents ornull
if not neededfromIndex
- the index of the occurrence of thestopAfter
to use to stop, must be positive- Returns:
- obtained path or empty string if object has no path, never
null
-
getPath
public static String getPath(Object object, String pathSeparator, Class<?> stopAfter, int fromIndex, Predicate<Object> filter) Obtains path string for a given object.- Parameters:
object
- the object to obtain path for, cannot benull
pathSeparator
- the path separator to use, cannot benull
stopAfter
- path generation will be stopped after object of this class is encountered among parents ornull
if not neededfromIndex
- the index of the occurrence of thestopAfter
to use to stop, must be positivefilter
- whether need to skip objects and don't add to result path, separator will aslo be skipped, can benull
if not needed; filter will be applied to each path element- Returns:
- obtained path or empty string if object has no path.
-