public static final class PrimitiveRegistry.Builder extends Object
| Constructor and Description |
|---|
Builder() |
Builder(PrimitiveRegistry registry) |
| Modifier and Type | Method and Description |
|---|---|
<KeyT extends Key,PrimitiveT> |
registerPrimitiveConstructor(PrimitiveConstructor<KeyT,PrimitiveT> primitiveConstructor)
Registers a primitive constructor for later use in
PrimitiveRegistry.getPrimitive(KeyT, java.lang.Class<PrimitiveT>). |
<InputPrimitiveT,WrapperPrimitiveT> |
registerPrimitiveWrapper(PrimitiveWrapper<InputPrimitiveT,WrapperPrimitiveT> wrapper) |
public Builder()
public Builder(PrimitiveRegistry registry)
@CanIgnoreReturnValue public <KeyT extends Key,PrimitiveT> PrimitiveRegistry.Builder registerPrimitiveConstructor(PrimitiveConstructor<KeyT,PrimitiveT> primitiveConstructor) throws GeneralSecurityException
PrimitiveRegistry.getPrimitive(KeyT, java.lang.Class<PrimitiveT>).
This registers a primitive constructor which can later be used to create a primitive
by calling PrimitiveRegistry.getPrimitive(KeyT, java.lang.Class<PrimitiveT>). If a constructor for the pair (KeyT, PrimitiveT)
has already been registered, this checks if they are the same. If they are, the call is
ignored, otherwise an exception is thrown.
GeneralSecurityException@CanIgnoreReturnValue public <InputPrimitiveT,WrapperPrimitiveT> PrimitiveRegistry.Builder registerPrimitiveWrapper(PrimitiveWrapper<InputPrimitiveT,WrapperPrimitiveT> wrapper) throws GeneralSecurityException
GeneralSecurityException