Code example for Excluder

Methods: withModifiers

0
   * {@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 
   */ 
  public GsonBuilder excludeFieldsWithModifiers(int... modifiers) {
    excluder = excluder.withModifiers(modifiers);
    return this;
  } 
 
  /** 
   * Makes the output JSON non-executable in Javascript by prefixing the generated JSON with some 
   * special text. This prevents attacks from third-party sites through script sourcing. See 
   * <a href="http://code.google.com/p/google-gson/issues/detail?id=42">Gson Issue 42</a> 
   * for details. 
   * 
   * @return a reference to this {@code GsonBuilder} object to fulfill the "Builder" pattern 
   * @since 1.3 
   */ 
  public GsonBuilder generateNonExecutableJson() {
    this.generateNonExecutableJson = true;