public class TypeUtils
extends java.lang.Object
| Constructor and Description |
|---|
TypeUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Class |
findFirstImplementationOfInterface(java.lang.Class interfaceType,
java.util.Set<java.lang.Class<?>> types)
Finds the first implementation of the given interface.
|
static java.util.Set<java.lang.Class<?>> |
findTypesAnnotatedWith(java.lang.Class<? extends java.lang.annotation.Annotation> annotation,
java.util.Set<java.lang.Class<?>> types)
Finds the set of types that are annotated with the specified annotation.
|
static TypeCategory |
getCategory(TypeRepository typeRepository,
java.lang.String typeName)
Finds the category of a given type.
|
static TypeVisibility |
getVisibility(TypeRepository typeRepository,
java.lang.String typeName)
Finds the visibility of a given type.
|
public static TypeVisibility getVisibility(TypeRepository typeRepository, java.lang.String typeName)
typeRepository - the repository where types should be loaded fromtypeName - the fully qualified type namepublic static TypeCategory getCategory(TypeRepository typeRepository, java.lang.String typeName)
typeRepository - the repository where types should be loaded fromtypeName - the fully qualified type namepublic static java.util.Set<java.lang.Class<?>> findTypesAnnotatedWith(java.lang.Class<? extends java.lang.annotation.Annotation> annotation,
java.util.Set<java.lang.Class<?>> types)
annotation - the Annotation to findtypes - the set of Class objects to search throughpublic static java.lang.Class findFirstImplementationOfInterface(java.lang.Class interfaceType,
java.util.Set<java.lang.Class<?>> types)
interfaceType - a Class object representing the interface typetypes - the set of Class objects to search through