public class DefaultProjectsPluginContainer extends DefaultPluginCollection<Plugin> implements PluginContainer
| Constructor and Description |
|---|
DefaultProjectsPluginContainer(PluginRegistry pluginRegistry,
Project project) |
| Modifier and Type | Method and Description |
|---|---|
<T extends Plugin> |
apply(Class<T> type)
Applies a plugin to the project.
|
Plugin |
apply(String id)
Has the same behavior as
PluginContainer.apply(Class) except that the the plugin is specified via its id. |
<T extends Plugin> |
findPlugin(Class<T> type)
Returns the plugin for the given type.
|
Plugin |
findPlugin(String id)
Returns the plugin for the given id.
|
<T extends Plugin> |
getAt(Class<T> type)
Returns a plugin with the specified type if this plugin has been used in the project.
|
Plugin |
getAt(String id)
Returns a plugin with the specified id if this plugin has been used in the project.
|
<T extends Plugin> |
getPlugin(Class<T> type)
Returns a plugin with the specified type if this plugin has been used in the project.
|
Plugin |
getPlugin(String id)
Returns a plugin with the specified id if this plugin has been used in the project.
|
protected Class<? extends Plugin> |
getTypeForId(String id) |
boolean |
hasPlugin(Class<? extends Plugin> type)
Returns true if the container has a plugin with the given type, false otherwise.
|
boolean |
hasPlugin(String id)
Returns true if the container has a plugin with the given id, false otherwise.
|
filtered, matching, matching, whenPluginAdded, whenPluginAdded, withTypefilteredStore, findAlladd, addAll, all, all, assertMutable, beforeChange, clear, contains, containsAll, createFilter, createFilter, createFilter, filteredEvents, findAll, getEventRegister, getStore, getType, isEmpty, iterator, remove, removeAll, retainAll, size, whenObjectAdded, whenObjectAdded, whenObjectRemoved, whenObjectRemoved, withType, withTypetoArray, toArray, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitmatching, matching, whenPluginAdded, whenPluginAdded, withTypefindAllall, all, whenObjectAdded, whenObjectAdded, whenObjectRemoved, whenObjectRemoved, withType, withTypepublic DefaultProjectsPluginContainer(PluginRegistry pluginRegistry, Project project)
public Plugin apply(String id)
PluginContainerPluginContainer.apply(Class) except that the the plugin is specified via its id. Not all
plugins have an id.apply in interface PluginContainerid - The id of the plugin to be applied.public <T extends Plugin> T apply(Class<T> type)
PluginContainerapply in interface PluginContainertype - The type of the plugin to be usedpublic boolean hasPlugin(String id)
PluginContainerhasPlugin in interface PluginContainerid - The id of the pluginpublic boolean hasPlugin(Class<? extends Plugin> type)
PluginContainerhasPlugin in interface PluginContainertype - The type of the pluginpublic Plugin findPlugin(String id)
PluginContainerfindPlugin in interface PluginContainerid - The id of the pluginpublic <T extends Plugin> T findPlugin(Class<T> type)
PluginContainerfindPlugin in interface PluginContainertype - The type of the pluginpublic Plugin getPlugin(String id)
PluginContainergetPlugin in interface PluginContainerid - The id of the pluginpublic Plugin getAt(String id) throws UnknownPluginException
PluginContainer[] operator to call this method from a build script.getAt in interface PluginContainerid - The id of the pluginUnknownPluginException - When there is no plugin with the given id.public <T extends Plugin> T getAt(Class<T> type) throws UnknownPluginException
PluginContainer[] operator to call this method from a build script.getAt in interface PluginContainertype - The type of the pluginUnknownPluginException - When there is no plugin with the given type.public <T extends Plugin> T getPlugin(Class<T> type) throws UnknownPluginException
PluginContainergetPlugin in interface PluginContainertype - The type of the pluginUnknownPluginException - When there is no plugin with the given type.Copyright © 2013. All rights reserved