Package com.wavefront.common
Class SerializerUtils
- java.lang.Object
-
- com.wavefront.common.SerializerUtils
-
public abstract class SerializerUtils extends Object
Common utility methods used by serializers.- Author:
- vasily@wavefront.com
-
-
Constructor Summary
Constructors Constructor Description SerializerUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringBuilderappendAnnotations(StringBuilder sb, List<Annotation> annotations)Append aList<Annotation>to a string builder as double-quoted key-value pairs.static StringBuilderappendQuoted(StringBuilder sb, String raw)static StringBuilderappendTagMap(StringBuilder sb, Map<String,String> tags)Append aMap<String, String>to a string builder as double-quoted key-value pairs.static StringBuilderappendTags(StringBuilder sb, String tagKey, List<String> tagValues)Append aList<String>to a string builder as double-quoted key-value pairs with a fixed key.
-
-
-
Method Detail
-
appendQuoted
public static StringBuilder appendQuoted(StringBuilder sb, String raw)
-
appendTagMap
public static StringBuilder appendTagMap(StringBuilder sb, @Nullable Map<String,String> tags)
Append aMap<String, String>to a string builder as double-quoted key-value pairs.- Parameters:
sb- Ainstancetags- Aap of tags.- Returns:
- StringBuilder instance
-
appendAnnotations
public static StringBuilder appendAnnotations(StringBuilder sb, @Nullable List<Annotation> annotations)
Append aList<Annotation>to a string builder as double-quoted key-value pairs.- Parameters:
sb- Ainstanceannotations- List of annotations.- Returns:
- StringBuilder instance
-
appendTags
public static StringBuilder appendTags(StringBuilder sb, String tagKey, @Nullable List<String> tagValues)
Append aList<String>to a string builder as double-quoted key-value pairs with a fixed key.- Parameters:
sb- AinstancetagKey- Key to usetagValues- List of tags to append.- Returns:
- StringBuilder instance
-
-