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> voiddetectNamespaces(Class<T> cls, NamespaceResolver namespaceResolver) Detects namespace declarations relevant to the specified class and registers them with the specifiedNamespaceResolver.static booleanisEntityType(Class<?> cls) Checks whether the specified class is an entity type.static booleanisManagedType(Class<?> cls) Checks whether the specified class is a managed type.static booleanisMappedSuperclassType(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
Namespaceas well as inNamespacesare 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:
trueif the class is a managed type,falseotherwise
-
isEntityType
Checks whether the specified class is an entity type.An entity is annotated with
OWLClass.- Parameters:
cls- Class to check- Returns:
trueif the class is an entity type,falseotherwise
-
isMappedSuperclassType
Checks whether the specified class is a managed superclass.An entity is annotated with
MappedSuperclass.- Parameters:
cls- Class to check- Returns:
trueif the class is a mapped superclass,falseotherwise
-