Package com.backblaze.b2.json
Class B2JsonTypeHandlerWithDefaults<T>
- java.lang.Object
-
- com.backblaze.b2.json.B2JsonInitializedTypeHandler<T>
-
- com.backblaze.b2.json.B2JsonTypeHandlerWithDefaults<T>
-
- All Implemented Interfaces:
B2JsonTypeHandler<T>
- Direct Known Subclasses:
B2JsonObjectHandler,B2JsonUnionBaseHandler
public abstract class B2JsonTypeHandlerWithDefaults<T> extends B2JsonInitializedTypeHandler<T>
Base class for all handlers that deal with default values.
-
-
Constructor Summary
Constructors Constructor Description B2JsonTypeHandlerWithDefaults()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidcheckDefaultValues()Checks whether default values are OK, and throws if not.protected voidthrowIfBadDefaultValue()Before (de)serializing, make sure that the defaults are OK.-
Methods inherited from class com.backblaze.b2.json.B2JsonInitializedTypeHandler
initializeImplementation, isInitialized
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.backblaze.b2.json.B2JsonTypeHandler
defaultValueForOptional, deserialize, deserializeUrlParam, getHandledType, isStringInJson, serialize
-
-
-
-
Method Detail
-
throwIfBadDefaultValue
protected void throwIfBadDefaultValue() throws B2JsonExceptionBefore (de)serializing, make sure that the defaults are OK.- Throws:
B2JsonException
-
checkDefaultValues
protected abstract void checkDefaultValues() throws B2JsonExceptionChecks whether default values are OK, and throws if not.- Throws:
B2JsonException
-
-