Class AnnotationBuilder

java.lang.Object
org.biojava.bio.program.tagvalue.AnnotationBuilder
All Implemented Interfaces:
TagValueListener

public class AnnotationBuilder extends Object implements TagValueListener

Builds an Annotation tree from TagValue events using an AnnotationType to work out which fields are of what type.

Since:
1.2
Author:
Matthew Pocock
  • Constructor Details

    • AnnotationBuilder

      Make a new AnnotationBuilder that will build Annotation instances of a given type.

      The type is used to provide appropriate accessors for properties. As tag -value events stream through this TagValueListener, they will be matched against the properties of the annotation type. As sub-trees of events are pushed, child annotation bundles will be pushed into the appropriate properties. If any of the tag-value events are of a type that are not accepted by the annotation type, a ClassCastException will be thrown.

      Parameters:
      type - the AnnotationType stating what will be built and how
      Throws:
      ClassCastException - if any of the tag-value events are of inappropriate type
  • Method Details