Public Member Functions | |
| EntityRefFinder () | |
| EntityRefFinder (boolean debug) | |
| EntityRefT[] | findEntityReferences (Object rootEntityObject) throws EntityException |
Private Member Functions | |
| void | recursiveFindEntityReferences (Object obj, ArrayList< EntityRefT > entityRefs) throws EntityException |
Private Attributes | |
| boolean | m_debug |
Takes an entity object (binding class) and traverses the tree to find references (EntityRefT nodes) to other entity objects.
Currently specific to XML binding classes produced by the Castor framework; should be not too hard though to adapt to others (mainly enumeration stuff)
Assumes that it's a tree, not a graph (therefore no checks whether a node has been visited already). On a graph this could lead to an infinite loop.
Possible optimization would be to compute on demand a list of Class objects for which we know that they can't have EntityRefT children, and to subsequently stop the recursion there.
| alma::acs::entityutil::EntityRefFinder::EntityRefFinder | ( | ) | [inline] |
| alma::acs::entityutil::EntityRefFinder::EntityRefFinder | ( | boolean | debug | ) | [inline] |
References m_debug.
| EntityRefT [] alma::acs::entityutil::EntityRefFinder::findEntityReferences | ( | Object | rootEntityObject | ) | throws EntityException [inline] |
References m_debug, and recursiveFindEntityReferences().
Referenced by alma::acs::entityutil::EntityRefFinderTest::testObsProject(), and alma::acs::entityutil::EntityRefFinderTest::testObsProposal().
| void alma::acs::entityutil::EntityRefFinder::recursiveFindEntityReferences | ( | Object | obj, | |
| ArrayList< EntityRefT > | entityRefs | |||
| ) | throws EntityException [inline, private] |
References m_debug.
Referenced by findEntityReferences().
boolean alma::acs::entityutil::EntityRefFinder::m_debug [private] |
Referenced by EntityRefFinder(), findEntityReferences(), and recursiveFindEntityReferences().
1.6.2