Package org.webpki.cbor
Class CBORTypedObjectDecoderCache
java.lang.Object
org.webpki.cbor.CBORTypedObjectDecoderCache
Cache for typed object decoders.
Stores CBORTypedObjectDecoder
classes for automatic instantiation during decoding.
See also Typed Objects for an example.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddToCache
(Class<? extends CBORTypedObjectDecoder> decoderClass) Add typed object decoder class to cache.decode
(CBORObject typedObject) Decode and instantiate typed object decoder.
-
Constructor Details
-
CBORTypedObjectDecoderCache
public CBORTypedObjectDecoderCache()Creates empty typed object decoder cache.
-
-
Method Details
-
decode
Decode and instantiate typed object decoder.- Parameters:
typedObject
- Typed object to be decoded- Returns:
- Instantiated
CBORTypedObjectDecoder
-
addToCache
Add typed object decoder class to cache.- Parameters:
decoderClass
- Typed decoder class- Returns:
CBORTypedObjectDecoderCache
-