@OpenApiAll
public class ClassTypes
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.Class[] |
RELATIONSHIP_TYPES
Relationship like classes
|
Constructor and Description |
---|
ClassTypes() |
Modifier and Type | Method and Description |
---|---|
static java.util.Collection<java.lang.Class> |
expandToConcreteMetaClasses(java.util.Collection<java.lang.Class> metaClasses)
Method replaces each abstract meta class with direct subclasses.
|
static java.util.Collection<java.lang.String> |
getAllClassNames() |
static java.util.List<java.lang.Class> |
getClassifiers()
Returns a list of all classifiers types.
|
static java.lang.Class |
getClassType(org.omg.mof.model.Classifier metatype) |
static java.lang.Class |
getClassType(java.lang.String shortName) |
static java.util.Set<java.lang.Class> |
getClassTypeForShortNames(java.util.Collection<java.lang.String> names) |
static java.util.Set<java.lang.Class> |
getClassTypesForElements(java.util.Collection<? extends BaseElement> elements) |
static java.util.List<java.lang.Class> |
getClassTypesForStereotypeBaseClasses(java.util.Collection<Stereotype> stereotypes) |
static java.util.List<java.lang.Class> |
getClassTypesForStereotypeBaseClasses(Stereotype stereotype) |
static java.util.List<java.lang.Class> |
getDirectSubtypes(java.lang.Class type,
boolean includeAbstract)
Gets only direct sub-types of the type.
|
static java.util.List<java.lang.Class> |
getNameSpaces()
Returns a list of all namespaces types.
|
static java.util.Collection<java.lang.Class> |
getPackagesNotProfile()
Returns a list of all classifiers types.
|
static java.util.Collection<java.lang.Class> |
getRelationshipTypes() |
static java.lang.String |
getShortName(java.lang.Class type) |
static java.util.Set<java.lang.String> |
getShortNameForClassTypes(java.util.Collection<java.lang.Class> types) |
static java.util.List<java.lang.Class> |
getSubtypes(java.lang.Class type) |
static java.util.List<java.lang.Class> |
getSubtypes(java.lang.Class type,
boolean includeAbstract) |
static java.util.Set<java.lang.Class> |
getSubtypes(java.util.Collection<java.lang.Class> types) |
static java.lang.Class[] |
getSubtypesArray(java.lang.Class type) |
static java.lang.Class[] |
getSubtypesArray(java.lang.Class type,
boolean includeAbstract) |
static java.lang.Class[] |
getSubtypesArray(java.util.Collection<java.lang.Class> type) |
static java.lang.Class[] |
getSubtypesArray(java.util.Collection<java.lang.Class> type,
boolean includeAbstract) |
static java.util.List<java.lang.Class> |
getSupertypes(java.lang.Class type) |
static java.util.List<Element> |
getTypeElements(java.util.List<java.lang.Object> types,
Project project)
Given a collection of types, returns a list of metamodel elements representing these types.
|
static boolean |
isRelationship(java.lang.Class type)
Check if given class is relationship
|
static void |
removeAbstract(java.util.Collection<java.lang.Class> classTypes) |
public static final java.lang.Class[] RELATIONSHIP_TYPES
public static java.util.List<java.lang.Class> getNameSpaces()
public static java.util.List<java.lang.Class> getClassifiers()
public static java.util.Collection<java.lang.Class> getPackagesNotProfile()
public static java.util.Set<java.lang.Class> getSubtypes(java.util.Collection<java.lang.Class> types)
types
- base typespublic static java.util.List<java.lang.Class> getSubtypes(java.lang.Class type)
type
- base typepublic static java.util.List<java.lang.Class> getSubtypes(java.lang.Class type, boolean includeAbstract)
type
- base typeincludeAbstract
- include abstract classespublic static java.lang.Class[] getSubtypesArray(java.lang.Class type)
type
- base typepublic static java.lang.Class[] getSubtypesArray(java.lang.Class type, boolean includeAbstract)
type
- base typeincludeAbstract
- include abstract classespublic static java.lang.Class[] getSubtypesArray(java.util.Collection<java.lang.Class> type)
type
- base typepublic static java.lang.Class[] getSubtypesArray(java.util.Collection<java.lang.Class> type, boolean includeAbstract)
type
- base typeincludeAbstract
- include abstract classespublic static java.util.List<java.lang.Class> getDirectSubtypes(java.lang.Class type, boolean includeAbstract)
getSubtypes(Class, boolean)
get get all available sub-types.type
- the super typeincludeAbstract
- true if abstract should be returnpublic static java.util.List<java.lang.Class> getSupertypes(java.lang.Class type)
public static java.lang.Class getClassType(org.omg.mof.model.Classifier metatype)
public static java.lang.Class getClassType(java.lang.String shortName)
shortName
- class short namepublic static java.lang.String getShortName(java.lang.Class type)
type
- java classpublic static java.util.Set<java.lang.Class> getClassTypesForElements(java.util.Collection<? extends BaseElement> elements)
public static java.util.Set<java.lang.String> getShortNameForClassTypes(java.util.Collection<java.lang.Class> types)
public static java.util.Set<java.lang.Class> getClassTypeForShortNames(java.util.Collection<java.lang.String> names)
public static void removeAbstract(java.util.Collection<java.lang.Class> classTypes)
public static java.util.List<java.lang.Class> getClassTypesForStereotypeBaseClasses(java.util.Collection<Stereotype> stereotypes)
public static java.util.List<java.lang.Class> getClassTypesForStereotypeBaseClasses(Stereotype stereotype)
public static java.util.Collection<java.lang.Class> expandToConcreteMetaClasses(java.util.Collection<java.lang.Class> metaClasses)
metaClasses
- meta classes collection.public static java.util.List<Element> getTypeElements(java.util.List<java.lang.Object> types, Project project)
types
- types for which to get the elements.project
- project in which to search.public static java.util.Collection<java.lang.Class> getRelationshipTypes()
public static boolean isRelationship(java.lang.Class type)
type
- given classpublic static java.util.Collection<java.lang.String> getAllClassNames()