Beispiel #1
0
 public Excluder withModifiers(int... modifiers) {
   Excluder result = clone();
   result.modifiers = 0;
   for (int modifier : modifiers) {
     result.modifiers |= modifier;
   }
   return result;
 }
Beispiel #2
0
 public Excluder withExclusionStrategy(
     ExclusionStrategy exclusionStrategy, boolean serialization, boolean deserialization) {
   Excluder result = clone();
   if (serialization) {
     result.serializationStrategies = new ArrayList<ExclusionStrategy>(serializationStrategies);
     result.serializationStrategies.add(exclusionStrategy);
   }
   if (deserialization) {
     result.deserializationStrategies =
         new ArrayList<ExclusionStrategy>(deserializationStrategies);
     result.deserializationStrategies.add(exclusionStrategy);
   }
   return result;
 }
Beispiel #3
0
 public Excluder excludeFieldsWithoutExposeAnnotation() {
   Excluder result = clone();
   result.requireExpose = true;
   return result;
 }
Beispiel #4
0
 public Excluder disableInnerClassSerialization() {
   Excluder result = clone();
   result.serializeInnerClasses = false;
   return result;
 }
Beispiel #5
0
 public Excluder withVersion(double ignoreVersionsAfter) {
   Excluder result = clone();
   result.version = ignoreVersionsAfter;
   return result;
 }