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 aLayerAndLoader
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.layer()
Returns the value of thelayer
record component.loader()
Returns the value of theloader
record component.static PluginsLoader.LayerAndLoader
ofLoader
(ClassLoader loader) static PluginsLoader.LayerAndLoader
final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
LayerAndLoader
Creates an instance of aLayerAndLoader
record class.- Parameters:
layer
- the value for thelayer
record componentloader
- the value for theloader
record 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 thelayer
record component.- Returns:
- the value of the
layer
record component
-
loader
Returns the value of theloader
record component.- Returns:
- the value of the
loader
record component
-