Class BeanDictionaryList

All Implemented Interfaces:
Serializable, Cloneable, Iterable<Class<?>>, Collection<Class<?>>, List<Class<?>>, RandomAccess
Direct Known Subclasses:
HtmlBeanDictionary

public class BeanDictionaryList extends ArrayList<Class<?>>
Represents a collection of bean classes that make up a bean dictionary.

The classes in the list must be one of the following:

Example:

// A bean dictionary list consisting of classes with @Bean(typeName) annotations. public class MyBeanDictionaryList extends BeanDictionaryList { // Must provide a no-arg constructor! public MyBeanDictionaryList() { super(ABean.class, BBean.class, CBean.class); } } // Use it in a parser. ReaderParser parser = JsonParser .create() .dictionary(MyBeanDictionaryList.class) .build();

Subclasses must implement a public no-arg constructor so that it can be instantiated by the bean context code.

See Also:
  • Constructor Details

    • BeanDictionaryList

      protected BeanDictionaryList(Class<?>... c)
      Constructor.
      Parameters:
      c - The list of bean classes to add to this dictionary. Classes must either specify a @Bean(typeName) value or be another subclass of BeanDictionaryList.
  • Method Details

    • append

      protected BeanDictionaryList append(Class<?>... c)
      Append one or more bean classes to this bean dictionary.
      Parameters:
      c - The list of bean classes to add to this dictionary. Classes must either specify a @Bean(typeName) value or be another subclass of BeanDictionaryList.
      Returns:
      This object.