Package com.nomagic.uml2.ext.jmi.reflect
Class ClassTypes
java.lang.Object
com.nomagic.uml2.ext.jmi.reflect.ClassTypes
Class has methods/table to get supertypes of given object.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Collection<Class<? extends Element>>
expandToConcreteMetaClasses
(Collection<Class<? extends Element>> metaClasses) Method replaces each abstract meta class with direct subclasses.static List<Class<? extends Classifier>>
Returns a list of all classifiers types.getClassType
(String shortName) getClassType
(List<String> qualifiedName) getClassType
(org.omg.mof.model.Classifier metatype) getClassTypesForElements
(Collection<? extends BaseElement> elements) getDirectSubtypes
(Class<T> type, boolean includeAbstract) Gets only direct sub-types of the type.Returns a list of all namespaces types.static Collection<Class<? extends Element>>
Returns a list of all classifiers types.static String
getShortName
(Class type) getShortNameForClassTypes
(Collection<Class> types) getSubtypes
(Class<? extends Element> type) getSubtypes
(Class<? extends Element> type, boolean includeAbstract) getSubtypes
(Collection<Class<T>> types) getSubtypes
(Collection<Class<T>> types, boolean includeAbstract) getSubtypesArray
(Class<T> type) getSubtypesArray
(Class<T> type, boolean includeAbstract) getSubtypesArray
(Collection<Class<T>> type) getSubtypesArray
(Collection<Class<T>> type, boolean includeAbstract) getSupertypes
(Class<T> type) getTypeQualifiedName
(javax.jmi.reflect.RefBaseObject refBaseObject) Get given object meta type qualified namestatic boolean
static void
removeAbstract
(Collection<Class> classTypes)
-
Field Details
-
BASE_PACKAGE
- See Also:
-
CLASS_COMPARATOR
-
-
Constructor Details
-
ClassTypes
public ClassTypes()
-
-
Method Details
-
getNameSpaces
Returns a list of all namespaces types.- Returns:
- a list of all namespaces types.
-
getClassifiers
Returns a list of all classifiers types.- Returns:
- a list of all classifiers types.
-
getPackagesNotProfile
Returns a list of all classifiers types.- Returns:
- a list of all classifiers types.
-
getSubtypes
-
getSubtypes
-
getSubtypes
-
getSubtypes
-
getSubtypesArray
-
getSubtypesArray
public static <T extends Element> Class<T>[] getSubtypesArray(Collection<Class<T>> type, boolean includeAbstract) -
getSubtypesArray
-
getSubtypesArray
-
getDirectSubtypes
public static <T extends Element> List<Class<? extends Element>> getDirectSubtypes(Class<T> type, boolean includeAbstract) Gets only direct sub-types of the type. UsegetSubtypes(Class, boolean)
get get all available sub-types.- Parameters:
type
- the super typeincludeAbstract
- include abstract types- Returns:
- collection of direct sub-types
-
getSupertypes
-
isTypeOf
-
getClassType
-
getClassType
-
getClassType
-
getShortName
-
getClassTypesForElements
-
getShortNameForClassTypes
-
getClassTypeForShortNames
-
removeAbstract
-
expandToConcreteMetaClasses
public static Collection<Class<? extends Element>> expandToConcreteMetaClasses(Collection<Class<? extends Element>> metaClasses) Method replaces each abstract meta class with direct subclasses. If subclass is abstract meta class as well then it gets replaced as well, till non abstract sub class is reached.- Returns:
- set of unique non-abstract meta classes
-
getTypeQualifiedName
Get given object meta type qualified name
-