org.biojava.utils.walker
Class WalkerFactory

java.lang.Object
  extended by org.biojava.utils.walker.WalkerFactory

public class WalkerFactory
extends java.lang.Object


Method Summary
 void addTypeWithParent(java.lang.Class type)
          Register a type as being a 'container' class.
static WalkerFactory getInstance()
           
static WalkerFactory getInstance(java.lang.Class typeClazz)
          Make a WalkerFactory that handles a Visitor for a class of type typeClazz.
 java.lang.Class getTypeClass()
           
 Walker getWalker(Visitor visitor)
          Get a Walker that is customosed to a particular visitor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static WalkerFactory getInstance(java.lang.Class typeClazz)
Make a WalkerFactory that handles a Visitor for a class of type typeClazz.

Parameters:
typeClazz - the Class this factory will walk over

getInstance

public static WalkerFactory getInstance()

getTypeClass

public java.lang.Class getTypeClass()

addTypeWithParent

public void addTypeWithParent(java.lang.Class type)
Register a type as being a 'container' class. Container classes will be scanned for methods for retrieving child instances that can be walked to. You should never need to call this. The library authors should take care of this for you. Register 'structural' classes here - those with children.

Parameters:
type - the Class of the type with children

getWalker

public Walker getWalker(Visitor visitor)
                 throws BioException
Get a Walker that is customosed to a particular visitor.

Parameters:
visitor - the Visitor this walker will scan with
Returns:
a Walker bound to this visitor
Throws:
BioException - if the walker could not be built