|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.epics.pvmanager.TypeSupport<T>
T - the type for which to add supportpublic abstract class TypeSupport<T>
Implements the mechanism for registering different types so that the library knows how to handle them.
For a type to be usable by the library it needs to be defined:
| Constructor Summary | |
|---|---|
TypeSupport(java.lang.Class<T> type,
java.lang.Class<? extends TypeSupport> typeSupportFamily)
Creates a new type support of the given type |
|
| Method Summary | ||
|---|---|---|
static void |
addTypeSupport(TypeSupport<?> typeSupport)
Adds type support for the given class. |
|
protected static
|
findTypeSupportFor(java.lang.Class<? extends TypeSupport> supportFamily,
java.lang.Class<T> typeClass)
Calculates and caches the type support for a particular class, so that introspection does not occur at every call. |
|
protected java.lang.Class<T> |
getType()
Defines on which class the support is defined. |
|
protected java.lang.Class<? extends TypeSupport> |
getTypeSupportFamily()
Defines which type of support is implementing, notification or time. |
|
static boolean |
isTypeDirectlySupported(java.lang.Class<? extends TypeSupport> typeSupportFamily,
java.lang.Class<?> type)
Checks whether the type is supported on the same exact type. |
|
static boolean |
isTypeSupported(java.lang.Class<? extends TypeSupport> typeSupportFamily,
java.lang.Class<?> type)
Checks whether the type is supported directly or through one of the supertypes. |
|
protected static
|
typeSupportsFor(java.lang.Class<T> supportFamily)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TypeSupport(java.lang.Class<T> type,
java.lang.Class<? extends TypeSupport> typeSupportFamily)
type - the type on which support is definedtypeSupportFamily - the kind of support is being defined| Method Detail |
|---|
public static void addTypeSupport(TypeSupport<?> typeSupport)
typeSupport - the support to add
public static boolean isTypeSupported(java.lang.Class<? extends TypeSupport> typeSupportFamily,
java.lang.Class<?> type)
type - type to check support fortypeSupportFamily - the family in which to look for
java.lang.RuntimeException - if multiple conflicting support is found
public static boolean isTypeDirectlySupported(java.lang.Class<? extends TypeSupport> typeSupportFamily,
java.lang.Class<?> type)
type - type to check support fortypeSupportFamily - the family in which to look for
protected static <T> TypeSupport<T> findTypeSupportFor(java.lang.Class<? extends TypeSupport> supportFamily,
java.lang.Class<T> typeClass)
Find the supports for all supertypes. If multiple supports for different supertypes are found, and there isn't a most specific one (i.e. one that implements all the others) then an exception is thrown.
T - the type to retrieve support forsupportFamily - the support family for which to find supporttypeClass - the class of the type
java.lang.RuntimeException - if multiple conflicting support is foundprotected static <T extends TypeSupport<?>> java.util.Collection<T> typeSupportsFor(java.lang.Class<T> supportFamily)
protected java.lang.Class<? extends TypeSupport> getTypeSupportFamily()
protected java.lang.Class<T> getType()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||