Class AnnotatorFactory

java.lang.Object
org.jsonschema2pojo.AnnotatorFactory

public class AnnotatorFactory extends Object
Factory object for creating Annotators for all the supported annotation styles.
  • Constructor Details

  • Method Details

    • getAnnotator

      public Annotator getAnnotator(AnnotationStyle style)
      Create a new Annotator that can create annotations according to the given style.
      Parameters:
      style - the annotation style that dictates what kind of annotations are required.
      Returns:
      an annotator matching to given style
    • getAnnotator

      public Annotator getAnnotator(Class<? extends Annotator> clazz)
      Create a new custom Annotator from the given class.
      Parameters:
      clazz - A class implementing Annotator.
      Returns:
      an instance of the given annotator type
    • getAnnotator

      public CompositeAnnotator getAnnotator(Annotator... annotators)