Code example for Excluder

Methods: withVersion

0
   * @param ignoreVersionsAfter any field or type marked with a version higher than this value 
   * are ignored during serialization or deserialization. 
   * @return a reference to this {@code GsonBuilder} object to fulfill the "Builder" pattern 
   */ 
  public GsonBuilder setVersion(double ignoreVersionsAfter) {
    excluder = excluder.withVersion(ignoreVersionsAfter);
    return this;
  } 
 
  /** 
   * Configures Gson to excludes all class fields that have the specified modifiers. By default, 
   * Gson will exclude all fields marked transient or static. This method will override that 
   * behavior. 
   * 
   * @param modifiers the field modifiers. You must use the modifiers specified in the 
   * {@link java.lang.reflect.Modifier} class. For example, 
   * {@link java.lang.reflect.Modifier#TRANSIENT}, 
   * {@link java.lang.reflect.Modifier#STATIC}. 
   * @return a reference to this {@code GsonBuilder} object to fulfill the "Builder" pattern 
   */