public final class RegistryConfiguration extends InternalConfiguration
| Modifier and Type | Method and Description |
|---|---|
static InternalConfiguration |
createFromPrimitiveRegistry(PrimitiveRegistry registry)
Do not call.
|
static RegistryConfiguration |
get() |
Class<?> |
getInputPrimitiveClass(Class<?> wrapperClassObject)
Given the target class, reveals primitive set of what type should be provided to the
InternalConfiguration.wrap method in order to get a wrapped object of the target class. |
<P> P |
getLegacyPrimitive(KeyData keyData,
Class<P> primitiveClass)
Creates a primitive from a key in the old (proto) format.
|
<P> P |
getPrimitive(Key key,
Class<P> primitiveClass)
Given a key and a desired primitive class, creates the required primitive.
|
<B,P> P |
wrap(PrimitiveSet<B> primitiveSet,
Class<P> clazz)
Wraps the primitives in the primitive set into the provided class.
|
public static RegistryConfiguration get()
public <P> P getLegacyPrimitive(KeyData keyData, Class<P> primitiveClass) throws GeneralSecurityException
InternalConfigurationgetLegacyPrimitive in class InternalConfigurationGeneralSecurityExceptionpublic <P> P getPrimitive(Key key, Class<P> primitiveClass) throws GeneralSecurityException
InternalConfigurationgetPrimitive in class InternalConfigurationGeneralSecurityExceptionpublic <B,P> P wrap(PrimitiveSet<B> primitiveSet, Class<P> clazz) throws GeneralSecurityException
InternalConfigurationwrap in class InternalConfigurationGeneralSecurityException - if the wrapper for the provided pair
(input class, wrapped class) is not registered@Nullable public Class<?> getInputPrimitiveClass(Class<?> wrapperClassObject)
InternalConfigurationInternalConfiguration.wrap method in order to get a wrapped object of the target class.getInputPrimitiveClass in class InternalConfigurationpublic static InternalConfiguration createFromPrimitiveRegistry(PrimitiveRegistry registry)
We shadow the function createFromPrimitiveRegistry here so that one cannot invoke
the static function in the superclass by writing RegistryConfiguration.createFromPrimitiveRegistry.