Class ManagedClassProcessor
java.lang.Object
cz.cvut.kbss.jopa.model.metamodel.ManagedClassProcessor
Utility methods for processing managed types for metamodel construction.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> void
detectNamespaces
(Class<T> cls, NamespaceResolver namespaceResolver) Detects namespace declarations relevant to the specified class and registers them with the specifiedNamespaceResolver
.static boolean
isEntityType
(Class<?> cls) Checks whether the specified class is an entity type.static boolean
isManagedType
(Class<?> cls) Checks whether the specified class is a managed type.static boolean
isMappedSuperclassType
(Class<?> cls) Checks whether the specified class is a managed superclass.
-
Method Details
-
detectNamespaces
Detects namespace declarations relevant to the specified class and registers them with the specifiedNamespaceResolver
.This means namespaces declared on the class itself, namespaces it inherited from super types, as well as namespaces declared for the package that contains the specified class.
Namespaces declared directly by
Namespace
as well as inNamespaces
are considered.- Parameters:
cls
- Class to detect namespaces fornamespaceResolver
- Namespace resolver containing detected namespaces
-
isManagedType
Checks whether the specified class is a managed type.That is, if it is an entity type (annotated with
OWLClass
) or a mapped superclass (annotated withMappedSuperclass
).- Parameters:
cls
- Class to check- Returns:
true
if the class is a managed type,false
otherwise
-
isEntityType
Checks whether the specified class is an entity type.An entity is annotated with
OWLClass
.- Parameters:
cls
- Class to check- Returns:
true
if the class is an entity type,false
otherwise
-
isMappedSuperclassType
Checks whether the specified class is a managed superclass.An entity is annotated with
MappedSuperclass
.- Parameters:
cls
- Class to check- Returns:
true
if the class is a mapped superclass,false
otherwise
-