org.biojava.bio.annodb
Class IndexedAnnotationDB.StaticMethodRPFactory

java.lang.Object
  extended by org.biojava.bio.annodb.IndexedAnnotationDB.StaticMethodRPFactory
All Implemented Interfaces:
java.io.Serializable, IndexedAnnotationDB.ParserListenerFactory
Enclosing class:
IndexedAnnotationDB

public static class IndexedAnnotationDB.StaticMethodRPFactory
extends java.lang.Object
implements IndexedAnnotationDB.ParserListenerFactory

An implementation of ParserListenerFactory that uses a static method.

Since:
1.3
Author:
Matthew Pocock
See Also:
Serialized Form

Constructor Summary
IndexedAnnotationDB.StaticMethodRPFactory(java.lang.reflect.Method method)
          Create a new StaticMethodRPFactory for a method.
 
Method Summary
 java.lang.reflect.Method getMethod()
          Get the Method used.
 ParserListener getParserListener(TagValueListener tvl)
          Get the ParserListener for a TagValueListener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexedAnnotationDB.StaticMethodRPFactory

public IndexedAnnotationDB.StaticMethodRPFactory(java.lang.reflect.Method method)
                                          throws java.lang.IllegalArgumentException
Create a new StaticMethodRPFactory for a method.

Parameters:
method - a Method to use
Throws:
java.lang.IllegalArgumentException - if the Method is not statically scoped, or does not return a ParserListener or take a single argument of type TagValueListener
Method Detail

getMethod

public java.lang.reflect.Method getMethod()
Get the Method used.

Returns:
the Method used.

getParserListener

public ParserListener getParserListener(TagValueListener tvl)
Description copied from interface: IndexedAnnotationDB.ParserListenerFactory
Get the ParserListener for a TagValueListener.

Specified by:
getParserListener in interface IndexedAnnotationDB.ParserListenerFactory
Parameters:
tvl - the TagValueListener to process
Returns:
the ParserListener for this