MCPcopy
hub / github.com/google/gson / ExclusionStrategy

Interface ExclusionStrategy

src/main/java/com/google/gson/ExclusionStrategy.java:96–109  ·  view source on GitHub ↗

A strategy (or policy) definition that is used to decide whether or not a field or top-level class should be serialized or deserialized as part of the JSON output/input. For serialization, if the #shouldSkipClass(Class) method returns false then that class or field type will not be part of t

Source from the content-addressed store, hash-verified

94 * @since 1.4
95 */
96public interface ExclusionStrategy {
97
98 /**
99 * @param f the field object that is under test
100 * @return true if the field should be ignored; otherwise false
101 */
102 public boolean shouldSkipField(FieldAttributes f);
103
104 /**
105 * @param clazz the class object that is under test
106 * @return true if the class should be ignored; otherwise false
107 */
108 public boolean shouldSkipClass(Class<?> clazz);
109}

Implementers 11

MockExclusionStrategysrc/test/java/com/google/gson/MockExcl
MyExclusionStrategysrc/test/java/com/google/gson/function
SyntheticFieldExclusionStrategysrc/main/java/com/google/gson/Syntheti
AnonymousAndLocalClassExclusionStrategysrc/main/java/com/google/gson/Anonymou
DisjunctionExclusionStrategysrc/main/java/com/google/gson/Disjunct
ExposeAnnotationSerializationExclusionStrategysrc/main/java/com/google/gson/ExposeAn
ModifierBasedExclusionStrategysrc/main/java/com/google/gson/Modifier
VersionExclusionStrategysrc/main/java/com/google/gson/VersionE
NullExclusionStrategysrc/main/java/com/google/gson/NullExcl
InnerClassExclusionStrategysrc/main/java/com/google/gson/InnerCla
ExposeAnnotationDeserializationExclusionStrategysrc/main/java/com/google/gson/ExposeAn

Calls

no outgoing calls

Tested by

no test coverage detected