Class WalkerFactory

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

public class WalkerFactory extends Object
  • Method Details

    • getInstance

      public static WalkerFactory getInstance(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 Class getTypeClass()
    • addTypeWithParent

      public void addTypeWithParent(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