Add stage methods at runtime.

        Stage methods all follow the same pattern.

        :param name: Stage name.
511243
def _add_stage(self, name):
        
        def stage_func(self, *args, **kwargs):
            """ Stage function.

            :param args: Positional arguments.
            :param kwargs: Keyword arguments.
            :return: Pipeline (for method chaining).
            """
            self._pipe.append(Stage(name, args, kwargs))
            return self

        setattr(Pipeline, name, stage_func)
797264
public ISarlEventBuilder addSarlEvent(String name) {
		ISarlEventBuilder builder = this.sarlEventProvider.get();
		builder.eInit(getScript(), name, getTypeResolutionContext());
		return builder;
	}
249657
private List<MethodNode> getMethods(String name, List<MethodNode> methods) {
        List<MethodNode> result = new ArrayList<MethodNode>();
        for (MethodNode mn : methods) {
            if (name.equals(mn.name)) {
                result.add(mn);
            }
        }
        return result;
    }
698351
public ISarlBehaviorBuilder addSarlBehavior(String name) {
		ISarlBehaviorBuilder builder = this.sarlBehaviorProvider.get();
		builder.eInit(getScript(), name, getTypeResolutionContext());
		return builder;
	}
827636
function (name, method) {
        // TODO: deal with registerPriority in 3.0
        this.map.events.registerPriority(name, this, method);
        this.map.events.registerPriority(name, this, this.setEvent);
    }
86456
public void nextStage(String name) throws IOException {
    endStage();
    this.currentStage = name;
    this.currentStageStart = System.currentTimeMillis();
  }
786002
def add_option(name, parameters)
      self.class.handle_warnings(name, **parameters.dup)
      chain_options.merge(name => parameters.merge(method_hash(parameters)))
    end
399373
public void addNewInstanceMethod(Method method) {
        final CachedMethod cachedMethod = CachedMethod.find(method);
        NewInstanceMetaMethod newMethod = new NewInstanceMetaMethod(cachedMethod);
        final CachedClass declaringClass = newMethod.getDeclaringClass();
        addNewInstanceMethodToIndex(newMethod, metaMethodIndex.getHeader(declaringClass.getTheClass()));
    }
726280
def workflow_add_stage(object_id, input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/%s/addStage' % object_id, input_params, always_retry=always_retry, **kwargs)
1181118
protected void addChatter (Name name)
    {
        // check to see if the chatter validator approves..
        if ((_chatterValidator != null) && (!_chatterValidator.isChatterValid(name))) {
            return;
        }

        boolean wasthere = _chatters.remove(name);
        _chatters.addFirst(name);
        if (!wasthere) {
            if (_chatters.size() > MAX_CHATTERS) {
                _chatters.removeLast();
            }
            notifyChatterObservers();
        }
    }
144382
@Override
  public void register(final String name, final CompletesEventuallyProvider completesEventuallyProvider) {
    completesEventuallyProvider.initializeUsing(stage());
    this.completesProviderKeeper.keep(name, completesEventuallyProvider);
  }
68208
def add(self, name: str, pattern: str) -> None:
        
        self.patterns[name] = URITemplate(
            pattern, converters=self.converters)
372199
def add_rule(self, name, callable_):
        """"""
        assert isinstance(name, basestring)
        assert callable(callable_)
        self.project_rules_.add_rule(name, callable_)
1037770
private void initializeStage() {
        // Define the stage title
        this.stage.setTitle(applicationTitle());

        // Define stage icons, the toolkit will use the best size
        final List<Image> stageIcons = stageIcons();
        if (stageIcons != null && !stageIcons.isEmpty()) {
            this.stage.getIcons().addAll(stageIcons);
        }

        // and allow customization
        customizeStage(this.stage);
    }
768094
protected function addStage(string $name, string $message, callable $callback): void
	{
		$this->stages[$name] = ["message" => $message, "callback" => $callback];
	}
964356
def add_parser(self, name, func):
        
        self.__parser_map__[name] = _func2method(func, method_name=name)
        return None
592539
protected void setDefaultNameIfNone(StreamletNamePrefix prefix, Set<String> stageNames) {
    if (getName() == null) {
      setName(defaultNameCalculator(prefix, stageNames));
    }
    if (stageNames.contains(getName())) {
      throw new RuntimeException(String.format(
          "The stage name %s is used multiple times in the same topology", getName()));
    }
    stageNames.add(getName());
  }