Package com.cedarsoftware.util.io
Class WriteOptionsBuilder
java.lang.Object
com.cedarsoftware.util.io.WriteOptionsBuilder
- Author:
- Kenny Partlow ([email protected])
Copyright (c) Cedar Software LLC
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addBaseWriter
(Class<?> c, JsonWriter.JsonClassWriter writer) build()
static WriteOptions
static Map
toMap
(WriteOptions options) withClassLoader
(ClassLoader classLoader) withCustomArgument
(String name, Object o) withCustomArguments
(Map<String, Object> map) withCustomTypeName
(Class<?> type, String newTypeName) withCustomTypeName
(String type, String newTypeName) withCustomTypeNameMap
(Map<String, String> map) withCustomWriter
(Class<?> c, JsonWriter.JsonClassWriter writer) withCustomWriterMap
(Map<? extends Class<?>, ? extends JsonWriter.JsonClassWriter> map) withDateFormat
(String format) withFieldNameBlackList
(Class<?> c, Collection<String> fields) withFieldNameBlackListMap
(Map<Class<?>, Collection<String>> map) withFieldSpecifier
(Class<?> c, List<String> fields) withFieldSpecifiersMap
(Map<Class<?>, Collection<String>> map) withNoCustomizationFor
(Class<?> c) withNoCustomizationsFor
(Collection<Class<?>> collection) This option only applies when you're writing enums as objects so we force the enum write to be ENUMS_AS_OBJECTSwriteLocalDateWithFormat
(DateTimeFormatter formatter)
-
Constructor Details
-
WriteOptionsBuilder
public WriteOptionsBuilder()
-
-
Method Details
-
withDefaultOptimizations
-
skipNullFields
-
withPrettyPrint
-
writeLongsAsStrings
-
writeEnumsAsObject
This option only applies when you're writing enums as objects so we force the enum write to be ENUMS_AS_OBJECTS- Returns:
-
doNotWritePrivateEnumFields
-
writeEnumsAsPrimitives
-
forceMapOutputAsKeysAndItems
-
doNotForceMapOutputAsKeysAndItems
-
withClassLoader
-
addBaseWriter
-
writeLocalDateAsTimeStamp
-
writeLocalDateWithFormat
-
withIsoDateTimeFormat
-
withIsoDateFormat
-
withDateFormat
-
withShortMetaKeys
-
neverShowTypeInfo
-
alwaysShowTypeInfo
-
showMinimalTypeInfo
-
withFieldNameBlackList
-
withFieldNameBlackListMap
-
withFieldSpecifier
-
withFieldSpecifiersMap
-
withCustomTypeName
-
withCustomTypeName
-
withCustomTypeNameMap
-
withCustomWriter
-
withCustomWriterMap
public WriteOptionsBuilder withCustomWriterMap(Map<? extends Class<?>, ? extends JsonWriter.JsonClassWriter> map) -
withNoCustomizationFor
-
withNoCustomizationsFor
-
withCustomArgument
-
withCustomArguments
-
toMap
-
fromMap
-
build
-