Package io.openliberty.mcp.encoders
Interface Encoder<TYPE,ENCODED>
- Type Parameters:
TYPE- The type to be encodedENCODED- The resulting type of encoding
- All Known Subinterfaces:
ContentEncoder<TYPE>,ToolResponseEncoder<TYPE>
public interface Encoder<TYPE,ENCODED>
-
Method Summary
-
Method Details
-
supports
- Parameters:
runtimeType- The runtime class of an object that should be encoded, must not benull- Returns:
trueif this encoder can encode the provided type,falseotherwise
-
encode
- Parameters:
value-- Returns:
- the encoded value
-