public final class PluginMetadata extends java.lang.Object
Immutable metadata extracted from a Grails plugin class during discovery.
This value object captures the fields needed for plugin filtering, ordering, dependency resolution, environment checks, and later bootstrap processing.
| Constructor and description |
|---|
PluginMetadata(java.lang.String name, java.lang.String pluginVersion, java.lang.String grailsVersionRange, java.lang.Class<?> pluginClass, java.lang.String[] loadAfterNames, java.lang.String[] loadBeforeNames, java.util.Map<java.lang.String, java.lang.Object> dependencies, java.lang.String[] dependsOnNames, java.lang.String[] evictions, java.lang.String[] observedPluginNames, java.util.Map<java.lang.String, java.util.Set<java.lang.Object>> environments, boolean enabled)Creates plugin metadata extracted from a plugin class. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public boolean |
equals(java.lang.Object o)Compares this metadata with another metadata instance using the logical plugin name. |
|
public java.util.Map<java.lang.String, java.lang.Object> |
getDependencies()Returns the raw declared dependency map. |
|
public java.lang.String |
getDependentVersion(java.lang.String name)Returns the declared version for the named plugin dependency. |
|
public java.lang.String[] |
getDependsOnNames()Returns the plugin names this plugin depends on. |
|
public boolean |
getEnabled()Returns whether the plugin is enabled or disabled. |
|
public java.util.Map<java.lang.String, java.util.Set<java.lang.Object>> |
getEnvironments()Returns the environments in which this plugin is enabled. |
|
public java.lang.String[] |
getEvictions()Returns the plugin names this plugin evicts. |
|
public java.lang.String |
getGrailsVersionRange()Returns the Grails version range supported by this plugin. |
|
public java.lang.String[] |
getLoadAfterNames()Returns the plugin names this plugin prefers to load after. |
|
public java.lang.String[] |
getLoadBeforeNames()Returns the plugin names this plugin prefers to load before. |
|
public java.lang.String |
getName()Returns the logical plugin name (for example core or myPlugin). |
|
public java.lang.String[] |
getObservedPluginNames()Returns the plugin names observed by this plugin. |
|
public java.lang.Class<?> |
getPluginClass()Returns the plugin implementation class. |
|
public java.lang.String |
getPluginVersion()Returns the declared plugin version. |
|
public int |
hashCode() |
|
public java.lang.String |
toString() |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |
Creates plugin metadata extracted from a plugin class.
name - the logical plugin name (for example core or myPlugin)pluginVersion - the declared plugin versiongrailsVersionRange - the Grails version range supported by this pluginpluginClass - the plugin implementation classloadAfterNames - plugin names this plugin prefers to load afterloadBeforeNames - plugin names this plugin prefers to load beforedependencies - the raw declared dependency map keyed by plugin namedependsOnNames - plugin names this plugin depends on, used for dependency resolutionevictions - plugin names this plugin evictsobservedPluginNames - plugin names observed by this pluginenvironments - the environments this plugin is enabled for, or an empty map if enabled for all environmentsenabled - whether the plugin is enabled at allCompares this metadata with another metadata instance using the logical plugin name.
o - the other object to comparetrue if both metadata instances have the same plugin nameReturns the raw declared dependency map.
Returns the declared version for the named plugin dependency.
name - the dependency plugin nameReturns the plugin names this plugin depends on.
Returns whether the plugin is enabled or disabled.
true if the plugin is enabledReturns the environments in which this plugin is enabled.
Returns the plugin names this plugin evicts.
Returns the Grails version range supported by this plugin.
Returns the plugin names this plugin prefers to load after.
Returns the plugin names this plugin prefers to load before.
Returns the logical plugin name (for example core or myPlugin).
Returns the plugin names observed by this plugin.
Returns the plugin implementation class.
Returns the declared plugin version.