Enum Class SPI.Role
- All Implemented Interfaces:
Serializable, Comparable<SPI.Role>, Constable
- Enclosing class:
SPI
Describes how external provider code participates in an SPI contract.
Compatibility is determined by the complete role set. For example, adding a method might be additive for code which only uses a type, while breaking code which implements that same type.
- Since:
- 8.0
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAllows external provider code to implement an interface, subclass a class, or override a method represented by the contract.Allows external provider code to make an implementation, instance, or value represented by the contract available to Hibernate through a documented supply point.Allows external provider code to consume the contract while implementing an integration. -
Method Summary
-
Enum Constant Details
-
USE
Allows external provider code to consume the contract while implementing an integration. Provider code may name the contract in source and binary signatures and, where the corresponding member is exposed, reference, invoke, or instantiate it.
USEdoes not authorize provider code to implement an interface, subclass a class, override a method, or supply a value to Hibernate. Those directions require IMPLEMENT or SUPPLY.Within one supported
X.Yrelease family, existing usable types and members are expected to retain source- and binary-compatible signatures. New members may be added when they remain compatible for every applicable role. Removal, renaming, incompatible signature change, or reduced accessibility of an existing usable member is incompatible. -
IMPLEMENT
Allows external provider code to implement an interface, subclass a class, or override a method represented by the contract.
For an implementable class, the supported subclass surface includes its exposed public and protected overridable instance methods. Supported constructors are classified independently;
IMPLEMENTon a class does not make every constructor a provider contract.Within one supported
X.Yrelease family, existing provider implementations and subclasses are expected to remain source and binary compatible. Adding an abstract method or otherwise imposing a new implementation obligation is incompatible. Adding a default or concrete method requires source-, binary-, and method-collision analysis. Removing or finalizing an overridable member, reducing its accessibility, or changing its signature incompatibly is also incompatible. -
SUPPLY
Allows external provider code to make an implementation, instance, or value represented by the contract available to Hibernate through a documented supply point.
SUPPLYdescribes direction, not discovery, construction, or implementation permission. A provider needs IMPLEMENT to implement or subclass a supplied contract and USE to consume APIs involved in producing the supplied value.Within one supported
X.Yrelease family, an existing supply point and the accepted value contract are expected to remain source and binary compatible. New optional supply points may be added. Requiring an existing provider to supply a new value, removing a supply point, or changing its accepted contract incompatibly is not compatible.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-