public abstract class ClassScanningSerializationPolicy extends java.lang.Object implements SerializationPolicy
DsonOutput.Output
types to
a set of pairs of classes and field/method names to output for that
serialization type.
This SerializationPolicy
operates by scanning a supplied list of classes.
Modifier | Constructor and Description |
---|---|
protected |
ClassScanningSerializationPolicy(java.util.Collection<java.lang.Class<?>> classes)
Scan for all classes with an
SerializerId annotation. |
Modifier and Type | Method and Description |
---|---|
com.google.common.collect.ImmutableMap<java.lang.Class<?>,com.google.common.collect.ImmutableSet<java.lang.String>> |
getIncludedFields(DsonOutput.Output output)
Retrieve the fields to output for the given output mode.
|
protected ClassScanningSerializationPolicy(java.util.Collection<java.lang.Class<?>> classes)
SerializerId
annotation.
The entire classpath is scanned, including JAR files.classes
- The list of classes to scan for serialization annotationsjava.lang.IllegalStateException
- If issues with serialization configuration
are found while scanning.public com.google.common.collect.ImmutableMap<java.lang.Class<?>,com.google.common.collect.ImmutableSet<java.lang.String>> getIncludedFields(DsonOutput.Output output)
SerializationPolicy
getIncludedFields
in interface SerializationPolicy
output
- The output modeClass<?>
and field names to output