code: Variable setVariable(final String name, Object value,
              final boolean strictJava, final boolean recurse)
              throws UtilEvalError {
          // primitives should have been wrapped
          if (value == null)
              value = Primitive.NULL; // So then wrap it
          // Locate the variable definition if it exists.
          final Variable existing = this.getVariableImpl(name, recurse);
          // Found an existing variable here (or above if recurse allowed)
          if ( existing != null ) {
              existing.setValue( value, Variable.ASSIGNMENT );
              return existing;
          } else {
              // No previous variable definition found here (or above if recurse)
              if (strictJava)
                  throw new UtilEvalError(
                          "(Strict Java mode) Assignment to undeclared variable: "
                                  + name);
              // If recurse, set global untyped var, else set it here.
              // NameSpace varScope = recurse ? getGlobal() : this;
              // This modification makes default allocation local
              // NameSpace varScope = this;
              final Variable var = this.createVariable(name, value,
                      null/* modifiers */);
              this.variables.put(name, var);
              this.nameSpaceChanged();
              return var;
          }
      }
docs: Set the value of a the variable 'name' through this namespace. The
  variable may be an existing or non-existing variable. It may live in this
  namespace or in a parent namespace if recurse is true.
  <p>
  Note: this method is primarily intended for use internally. If you use
  this method outside of the bsh package and wish to set variables with
  primitive values you will have to wrap them using bsh.Primitive.
  </p>
  @param name the name
  @param value the value
  @param strictJava specifies whether strict java rules are applied.
  @param recurse determines whether we will search for the variable in our
  parent's scope before assigning locally.
  @return the variable
  @throws UtilEvalError the util eval error
  @see bsh.Primitive
  <p>
  Setting a new variable (which didn't exist before) or removing a
  variable causes a namespace change. </p>