- Type Parameters:
T- The type of the variable argument value.E- The type of the repeated elements.
- All Known Implementing Classes:
ListVarargCodec
public interface VarargCodec<T,E>
A codec for variable argument values.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceBuilds paths for elements of a variable argument. -
Method Summary
Modifier and TypeMethodDescriptiondecodeVararg(Deque<ESExpr> exprs, VarargCodec.PositionalPathBuilder pathBuilder) Decode a list of expressions into a variable argument value.voidencodeVararg(T value, List<ESExpr> exprs) Encode a variable argument value into a list of expressions.booleanisEncodedEqual(T x, T y) Determines whether two variable argument values are encoded equally.
-
Method Details
-
isEncodedEqual
-
encodeVararg
-
decodeVararg
T decodeVararg(Deque<ESExpr> exprs, VarargCodec.PositionalPathBuilder pathBuilder) throws DecodeException Decode a list of expressions into a variable argument value.- Parameters:
exprs- The expressions.pathBuilder- A path builder of the current expressions within the decoded object for diagnostic purposes.- Returns:
- The variable argument value.
- Throws:
DecodeException- when the value cannot be decoded.
-