| Modifier and Type | Field and Description |
|---|---|
static String |
NAME_IMMEDIATE_PACKAGE
An element of the object navigation path that leads to the obejct's immediate package
|
static String |
NAME_METACLASSNAME
An element of the object navigation path that leads to the qualified name of
the obejct's meta-object within the MOF metamodel
|
static String |
NAME_METAOBJECT
An element of the object navigation path that leads to the obejct's meta-object
|
static String |
NAME_MOFID
The explicit attribute name that refers the MOF ID of the object.
|
static String |
NAME_OUTER_MOST_PACKAGE
An element of the object navigation path that leads to the obejct's outer-most package
|
static String |
OBJECT_PATH_SEPARATORS
Regular expression for allowed separators in object navigation paths
|
| Constructor and Description |
|---|
Navigator() |
| Modifier and Type | Method and Description |
|---|---|
static List<? extends Object> |
collectValues(javax.jmi.reflect.RefFeatured startFrom,
String path,
boolean reportExceptions)
Collects all values the path describes starting form the startFrom object
|
static List<javax.jmi.reflect.RefAssociation> |
getAllAssociations(javax.jmi.reflect.RefPackage sourceExtent) |
static List<javax.jmi.reflect.RefClass> |
getAllClasses(javax.jmi.reflect.RefPackage sourceExtent)
This method locates all objects in the model package/extent
|
static List<javax.jmi.reflect.RefObject> |
getAllObjects(javax.jmi.reflect.RefPackage sourceExtent)
This method locates all objects in the model package/extent
|
static Collection<javax.jmi.model.Classifier> |
getAllSuperMetaObejcts(javax.jmi.model.Classifier mofMetaObject)
This method retrieves the descriptions of all super classes in the metamodel
|
static javax.jmi.reflect.RefClass |
getMetaClass(javax.jmi.reflect.RefPackage rootPackage,
String metaClassName)
This method parses the metaclass parameter, matches it with the meta model structure, and finds
the meta class with the qualified metaclass name.
|
static String |
getMetaClassName(javax.jmi.reflect.RefObject element)
This method constructs the name of the metaclass of the model element provided.
|
static javax.jmi.reflect.RefPackage |
getMetaPackage(javax.jmi.reflect.RefPackage rootPackage,
String metaPackageName)
This method finds the metapackage with the name provided
|
static Object |
getReflectiveValue(Object startFrom,
String itemName)
Retrieve a single value using of the named association or attribute, using the MOF reflective interfaces
|
public static final String OBJECT_PATH_SEPARATORS
public static final String NAME_MOFID
public static final String NAME_METAOBJECT
public static final String NAME_METACLASSNAME
public static final String NAME_OUTER_MOST_PACKAGE
public static final String NAME_IMMEDIATE_PACKAGE
public Navigator()
public static List<? extends Object> collectValues(javax.jmi.reflect.RefFeatured startFrom, String path, boolean reportExceptions) throws javax.jmi.reflect.JmiException
Format: {asssociationName.}[attributeName]
associationName = name
| METAOBJECT
| METACLASSNAME
| IPACKAGE
| OPACKAGE
attributeName = name
| MOFID
where:
MOFID refers the MOF ID of the object to process
METAOBJECT retrieves the meta-object of the object to process. This allows reflective navigation.
METACLASSNAME retrieves the qualified (in the meta-model) name of the meta-class for the processed object.
IPACKAGE retrieves the immediate package in the meta-model the processed object is in
OPACKAGE retrieves the outer-most package (the extent) where object processed is in
startFrom - path - is a non-null path following *-to-many or *-to-one associations and ending optionally with attributereportExceptions - in some cases it makes no sense to report the exceptions, while generating them allocates
significant resources, but the client code does not use them. Set it to true in order to suppress throwing
the exceptions.javax.jmi.reflect.JmiExceptionpublic static Object getReflectiveValue(Object startFrom, String itemName) throws javax.jmi.reflect.InvalidNameException
startFrom - itemName - javax.jmi.reflect.InvalidNameException - when the value could not be retrievedpublic static List<javax.jmi.reflect.RefObject> getAllObjects(javax.jmi.reflect.RefPackage sourceExtent)
sourceExtent - non-null extent where to find the metaclasspublic static List<javax.jmi.reflect.RefAssociation> getAllAssociations(javax.jmi.reflect.RefPackage sourceExtent)
sourceExtent - non-null extent where to find the metaclassespublic static List<javax.jmi.reflect.RefClass> getAllClasses(javax.jmi.reflect.RefPackage sourceExtent)
sourceExtent - non-null extent where to find the metaclasspublic static javax.jmi.reflect.RefPackage getMetaPackage(javax.jmi.reflect.RefPackage rootPackage, String metaPackageName) throws javax.jmi.reflect.JmiException
rootPackage - is the top-most package / the model's extentmetaPackageName - a meta package name with syntax [<package>{::<package>}]javax.jmi.reflect.JmiException - if the meta package name is not a valid onepublic static javax.jmi.reflect.RefClass getMetaClass(javax.jmi.reflect.RefPackage rootPackage, String metaClassName) throws javax.jmi.reflect.JmiException
rootPackage - is the top-most package / the model's extentmetaClassName - a meta class qualified name with syntax {<package>::} <class> metaclass attributejavax.jmi.reflect.JmiException - if the metaclass name is not a valid onepublic static String getMetaClassName(javax.jmi.reflect.RefObject element) throws javax.jmi.reflect.JmiException
element - is the non-null object to find metaclass ofjavax.jmi.reflect.JmiException - if the metaclass name is not a valid onepublic static Collection<javax.jmi.model.Classifier> getAllSuperMetaObejcts(javax.jmi.model.Classifier mofMetaObject)
mofMetaObject - Copyright © 2001–2018 MDA Tools. All rights reserved.