Top Fields Constructors Methods
com.rometools.rome.io.impl

public abstract Class PluginManager<T>

extends Object
Class Inheritance
Known Direct Subclasses
com.rometools.rome.feed.synd.impl.Converters, com.rometools.rome.io.impl.FeedGenerators, com.rometools.rome.io.impl.FeedParsers, com.rometools.rome.io.impl.ModuleGenerators, com.rometools.rome.io.impl.ModuleParsers
Imports
java.util.ArrayList, .Collection, .Collections, .HashMap, .Iterator, .List, .Map, com.rometools.rome.feed.impl.ConfigurableClassLoader, com.rometools.rome.io.DelegatingModuleGenerator, .DelegatingModuleParser, .WireFeedGenerator, .WireFeedParser

Field Summary

Modifier and TypeField and Description
private final List<String>
private final WireFeedGenerator
private final WireFeedParser
private List<T>
private Map<String, T>
private final String[]

Constructor Summary

AccessConstructor and Description
protected
PluginManager(final String
property key defining the plugins classes
propertyKey
)

Creates a PluginManager

protected
PluginManager(final String propertyKey, final WireFeedParser parentParser, final WireFeedGenerator parentGenerator)

Method Summary

Modifier and TypeMethod and Description
private Class<T>[]

Returns:

array containing the classes defined in the properties files.
getClasses
()

Loads and returns the classes defined in the properties files.

protected abstract String
getKey(T obj)

protected List<String>
protected T
getPlugin(final String key)

protected Map<String, T>
protected List<T>
private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

keysback to summary
private final List<String> keys
parentGeneratorback to summary
private final WireFeedGenerator parentGenerator
parentParserback to summary
private final WireFeedParser parentParser
pluginsListback to summary
private List<T> pluginsList
pluginsMapback to summary
private Map<String, T> pluginsMap
propertyValuesback to summary
private final String[] propertyValues

Constructor Detail

PluginManagerback to summary
protected PluginManager(final String propertyKey)

Creates a PluginManager

Parameters
propertyKey:String

property key defining the plugins classes

PluginManagerback to summary
protected PluginManager(final String propertyKey, final WireFeedParser parentParser, final WireFeedGenerator parentGenerator)

Method Detail

getClassesback to summary
private Class<T>[] getClasses() throws ClassNotFoundException

Loads and returns the classes defined in the properties files. If the system property "rome.pluginmanager.useloadclass" is set to true then classLoader.loadClass will be used to load classes (instead of Class.forName). This is designed to improve OSGi compatibility. Further information can be found in https://rome.dev.java.net/issues/show_bug.cgi?id=118

Returns:Class<T>[]

array containing the classes defined in the properties files.

Annotations
@SuppressWarnings:unchecked
Exceptions
ClassNotFoundException:
thrown if one of the classes defined in the properties file cannot be loaded and hard failure is ON.
getKeyback to summary
protected abstract String getKey(T obj)
getKeysback to summary
protected List<String> getKeys()
getPluginback to summary
protected T getPlugin(final String key)
getPluginMapback to summary
protected Map<String, T> getPluginMap()
getPluginsback to summary
protected List<T> getPlugins()
loadPluginsback to summary
private void loadPlugins()