public abstract class NavigateObjectPath<R> extends Object implements Function<javax.jmi.reflect.RefFeatured,R>
Format:
empty
| asssociationToOneName{.asssociationToOneName}
| [asssociationToOneName{.asssociationToOneName}.](associationToMany | attributeName)
associationToOneName = name
| METAOBJECT
| METACLASSNAME
| IPACKAGE
| OPACKAGE
associationToManyName = name
attributeName = name
| MOFID
where:
name is the name of an association in *-to-one multiplicity. In the case when there is no attribute name,
the last used name can be an association *-to-many
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
| Modifier | Constructor and Description |
|---|---|
protected |
NavigateObjectPath(String path) |
protected |
NavigateObjectPath(String[] path) |
| Modifier and Type | Method and Description |
|---|---|
R |
execute(javax.jmi.reflect.RefFeatured start) |
protected abstract R |
processEmptyPath(javax.jmi.reflect.RefFeatured start)
Processing an EMPTY navigation path
|
protected abstract R |
processLast(javax.jmi.reflect.RefFeatured start,
javax.jmi.reflect.RefFeatured current,
String itemName,
Object value)
Processing of the final attribute or association *-to-MANY in the path
|
protected abstract R |
processLast(javax.jmi.reflect.RefFeatured start,
javax.jmi.reflect.RefFeatured current,
String itemName,
javax.jmi.reflect.RefFeatured associated)
Processing of the final association *-to-ONE in the path
|
protected NavigateObjectPath(String path)
path - a non-null path following *-to-one associations and ending optionally with attribute or *-to-many associationprotected NavigateObjectPath(String[] path)
path - a non-null path following *-to-one associations and ending optionally with attribute or *-to-many associationpublic final R execute(javax.jmi.reflect.RefFeatured start) throws RuntimeException, IllegalArgumentException
execute in interface Function<javax.jmi.reflect.RefFeatured,R>start - non-null object to start naviagtion fromRuntimeExceptionIllegalArgumentExceptionFunction.execute(java.lang.Object)protected abstract R processEmptyPath(javax.jmi.reflect.RefFeatured start)
start - not null object the navigation started fromprotected abstract R processLast(javax.jmi.reflect.RefFeatured start, javax.jmi.reflect.RefFeatured current, String itemName, javax.jmi.reflect.RefFeatured associated)
start - not null object the navigation started fromcurrent - not null object reached down the path EXCEPT the last name in that pathitemName - the non-null, non-empty last name in the path, which is an association *-to-ONE,
already validated as accessible through Navigator.getReflectiveValue(Object, String)associated - the reached last associated to current model element in the association itemNameprotected abstract R processLast(javax.jmi.reflect.RefFeatured start, javax.jmi.reflect.RefFeatured current, String itemName, Object value)
start - not null object the navigation started fromvalue - the attribute value or association *-to-MANY reached at the end of the pathitemName - the non-null, non-empty last name in the path, which is an association *-to-MANY or attribute name,
already validated as accessible through Navigator.getReflectiveValue(Object, String)Copyright © 2001–2018 MDA Tools. All rights reserved.