Record Class Capability
java.lang.Object
java.lang.Record
zeroecho.core.Capability
- Record Components:
algorithmId- canonical algorithm identifierfamily- algorithm familyrole- supported key usagecontextType- produced context typekeyType- accepted key typespecType- accepted specification typedefaultSpec- non-null resolved default specification
public record Capability(String algorithmId, AlgorithmFamily family, KeyUsage role, Class<? extends CryptoContext> contextType, Class<? extends Key> keyType, Class<? extends ContextSpec> specType, ContextSpec defaultSpec)
extends Record
Immutable value descriptor of one algorithm context capability.
The default specification is resolved once during provider construction. All components therefore have stable value semantics and are safe for concurrent reads.
- Since:
- 1.0
-
Constructor Summary
ConstructorsConstructorDescriptionCapability(String algorithmId, AlgorithmFamily family, KeyUsage role, Class<? extends CryptoContext> contextType, Class<? extends Key> keyType, Class<? extends ContextSpec> specType, ContextSpec defaultSpec) Validates the capability metadata. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thealgorithmIdrecord component.Class<? extends CryptoContext> Returns the value of thecontextTyperecord component.Returns the value of thedefaultSpecrecord component.final booleanIndicates whether some other object is "equal to" this one.family()Returns the value of thefamilyrecord component.final inthashCode()Returns a hash code value for this object.keyType()Returns the value of thekeyTyperecord component.role()Returns the value of therolerecord component.Class<? extends ContextSpec> specType()Returns the value of thespecTyperecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Capability
public Capability(String algorithmId, AlgorithmFamily family, KeyUsage role, Class<? extends CryptoContext> contextType, Class<? extends Key> keyType, Class<? extends ContextSpec> specType, ContextSpec defaultSpec) Validates the capability metadata.- Throws:
NullPointerException- if a component isnullIllegalArgumentException- ifdefaultSpecis incompatible withspecType
-
-
Method Details
-
toString
-
hashCode
-
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). -
algorithmId
Returns the value of thealgorithmIdrecord component.- Returns:
- the value of the
algorithmIdrecord component
-
family
-
role
-
contextType
Returns the value of thecontextTyperecord component.- Returns:
- the value of the
contextTyperecord component
-
keyType
-
specType
-
defaultSpec
Returns the value of thedefaultSpecrecord component.- Returns:
- the value of the
defaultSpecrecord component
-