code: protected void setProcessor(final Processor processor) throws BuildException, NullPointerException {
      if (processor == null) {
        throw new NullPointerException("processor");
      }
      if (isReference()) {
        throw super.tooManyAttributes();
      }
      if (this.env == null && !this.newEnvironment) {
        this.processor = processor;
      } else {
        this.processor = processor.changeEnvironment(this.newEnvironment, this.env);
      }
    }
docs: Sets the processor
  
  @param processor
  processor, may not be null.
  @throws BuildException
  if ProcessorDef is a reference
  @throws NullPointerException
  if processor is null