|
Knopflerfish OSGi 5.2.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.knopflerfish.service.console.Util
public class Util
Utility methods for building CommandGroups to the console. This is a set of methods that does some useful things for displaying and sorting framework information.
Constructor Summary | |
---|---|
Util()
|
Method Summary | |
---|---|
static void |
selectBundles(Bundle[] bundles,
java.lang.String[] selection)
Select bundles from an array of Bundle objects. |
static void |
selectBundles(Bundle[] bundles,
java.lang.String[] selection,
java.util.Set<java.lang.String> selectionMatches)
Select bundles from an array of Bundle objects. |
static java.lang.String |
shortName(Bundle bundle)
Get short name of specified bundle. |
static java.lang.String |
showId(Bundle bundle)
Get bundle identifier as a constant length string. |
static java.lang.String |
showLeft(int width,
java.lang.String str)
Show a string left adjusted in constant length string. |
static java.lang.String |
showObject(java.lang.Object o)
Get string representation of an object. |
static java.lang.String |
showRight(int width,
java.lang.String str)
Show a string right adjusted in constant length string. |
static java.lang.String |
showServiceClasses(ServiceReference<?> sr)
Get Service class list as a string. |
static java.lang.String |
showState(Bundle bundle)
Get bundle state as a constant length string. |
static void |
sortBundles(Bundle[] b,
boolean longName)
Sort an array of bundle objects based on their location or shortname. |
static void |
sortBundlesId(Bundle[] b)
Sort an array of bundle objects based on their Bundle Id. |
static void |
sortBundlesTime(Bundle[] b)
Sort an array of bundle objects based on their Last modified time. |
static java.lang.String |
symbolicName(Bundle bundle)
Get the symbolic name of the specified bundle. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Util()
Method Detail |
---|
public static void selectBundles(Bundle[] bundles, java.lang.String[] selection)
bundles
- array of bundles to be checked, modified with resultselection
- array of selection string to match against bundlespublic static void selectBundles(Bundle[] bundles, java.lang.String[] selection, java.util.Set<java.lang.String> selectionMatches)
bundles
- array of bundles to be checked, modified with resultselection
- array of selection string to match against bundlesselectionMatches
- Each patterns from selection array that matches a bundle will be
added to this set.public static void sortBundles(Bundle[] b, boolean longName)
b
- array of bundles to be sorted, modified with resultlongName
- if true sort on location otherwise on shortnamepublic static void sortBundlesId(Bundle[] b)
b
- array of bundles to be sorted, modified with resultpublic static void sortBundlesTime(Bundle[] b)
b
- array of bundles to be sorted, modified with resultpublic static java.lang.String shortName(Bundle bundle)
bundle
- the bundle
public static java.lang.String symbolicName(Bundle bundle)
bundle
- the bundle
public static java.lang.String showState(Bundle bundle)
bundle
- the bundle
public static java.lang.String showId(Bundle bundle)
bundle
- the bundle
public static java.lang.String showServiceClasses(ServiceReference<?> sr)
sr
- The service
public static java.lang.String showObject(java.lang.Object o)
o
- the object to show
public static java.lang.String showLeft(int width, java.lang.String str)
str
- the object to showwidth
- the desired width of the result
public static java.lang.String showRight(int width, java.lang.String str)
str
- the object to showwidth
- the desired width of the result
|
Knopflerfish OSGi 5.2.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |