|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.csstudio.ui.util.AdapterUtil
public class AdapterUtil
Utilities for using adapters, particularly against selections.
Constructor Summary | |
---|---|
AdapterUtil()
|
Method Summary | ||
---|---|---|
static
|
convert(ISelection selection,
java.lang.Class<T> clazz)
Returns the current selection converted to an array of the desired type, or to an empty array if not possible. |
|
static java.lang.Object |
convert(java.lang.Object obj,
java.lang.String targetClass)
Adapts an object to the desired type. |
|
static java.lang.String[] |
getAdaptableTypes(java.lang.Class<?> clazz)
Returns all class names that an object of that class can be converted to. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AdapterUtil()
Method Detail |
---|
public static java.lang.String[] getAdaptableTypes(java.lang.Class<?> clazz)
clazz
- a class
public static <T> T[] convert(ISelection selection, java.lang.Class<T> clazz)
T
- requested typeselection
- a selectionclazz
- the desired type
public static java.lang.Object convert(java.lang.Object obj, java.lang.String targetClass)
obj
- Object to adapttargetClass
- Desired class name
targetClass
or null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |