net.sf.farrago.catalog
Class MockMetadataFactory.JmiVisitor

java.lang.Object
  extended by net.sf.farrago.catalog.MockMetadataFactory.JmiVisitor
Direct Known Subclasses:
MockMetadataFactory.JmiPrinter
Enclosing class:
MockMetadataFactory

abstract static class MockMetadataFactory.JmiVisitor
extends Object

Abstract base class for an iterator over a JMI object and its children.

The current implementation isn't very elegant. It makes a lot of assumptions about how the JMI tree is represented. We should adopt a 'real' visitor pattern -- with an 'accept' method on each handler object -- if this class is ever made public.


Constructor Summary
MockMetadataFactory.JmiVisitor()
           
 
Method Summary
protected  void accept(Object o)
           
protected  void extractProperties(Object o, List<String> attrNames, List<Object> attrValues, List<String> collectionNames, List<Collection<?>> collectionValues, List<String> refNames, List<RefBaseObject> refValues)
          From a data object, builds lists of attributes, collections, and references.
protected abstract  void visit(Object o, List<String> attrNames, List<Object> attrValues, List<String> collectionNames, List<Collection<?>> collectionValues, List<String> refNames, List<RefBaseObject> refValues)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockMetadataFactory.JmiVisitor

MockMetadataFactory.JmiVisitor()
Method Detail

accept

protected void accept(Object o)

extractProperties

protected void extractProperties(Object o,
                                 List<String> attrNames,
                                 List<Object> attrValues,
                                 List<String> collectionNames,
                                 List<Collection<?>> collectionValues,
                                 List<String> refNames,
                                 List<RefBaseObject> refValues)
From a data object, builds lists of attributes, collections, and references.


visit

protected abstract void visit(Object o,
                              List<String> attrNames,
                              List<Object> attrValues,
                              List<String> collectionNames,
                              List<Collection<?>> collectionValues,
                              List<String> refNames,
                              List<RefBaseObject> refValues)