Module org.elasticsearch.server
Package org.elasticsearch.plugins
Record Class PluginsLoader.LayerAndLoader
java.lang.Object
java.lang.Record
org.elasticsearch.plugins.PluginsLoader.LayerAndLoader
- Enclosing class:
PluginsLoader
public static record PluginsLoader.LayerAndLoader(ModuleLayer layer, ClassLoader loader)
extends Record
Tuple of module layer and loader.
Modular Plugins have a plugin specific loader and layer.
Non-Modular plugins have a plugin specific loader and the boot layer.
-
Constructor Summary
ConstructorsConstructorDescriptionLayerAndLoader(ModuleLayer layer, ClassLoader loader) Creates an instance of aLayerAndLoaderrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.layer()Returns the value of thelayerrecord component.loader()Returns the value of theloaderrecord component.static PluginsLoader.LayerAndLoaderofLoader(ClassLoader loader) static PluginsLoader.LayerAndLoaderfinal StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LayerAndLoader
Creates an instance of aLayerAndLoaderrecord class.- Parameters:
layer- the value for thelayerrecord componentloader- the value for theloaderrecord component
-
-
Method Details
-
ofLoader
-
ofUberModuleLoader
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
layer
Returns the value of thelayerrecord component.- Returns:
- the value of the
layerrecord component
-
loader
Returns the value of theloaderrecord component.- Returns:
- the value of the
loaderrecord component
-