Register a new parser method with name ``name``, given a marshmallow ``Field``.
482029
def add_parser_from_field(self, name, field_cls):
        """"""
        self.__parser_map__[name] = _field2method(field_cls, method_name=name)
807879
def register(self, name):
        
        signal = Signal(providing_args=['args', 'kwargs'])
        self._registry[name] = signal
        return signal
943553
def field2parameter(self, field, name="body", default_in="body"):
        
        location = field.metadata.get("location", None)
        prop = self.field2property(field)
        return self.property2parameter(
            prop,
            name=name,
            required=field.required,
            multiple=isinstance(field, marshmallow.fields.List),
            location=location,
            default_in=default_in,
        )
187340
def register_app(self, name: str, app: Callable = None) -> Callable:
        
        if app is None:
            def dec(app):
                """ inner decorator for register app """
                assert app is not None
                self.register_app(name, app)
                return app
            return dec
        self.applications[name] = app
        return None
1229347
def register_parser(self, type, parser, **meta):
        
        try:
            self.registered_formats[type]['parser'] = parser
        except KeyError:
            self.registered_formats[type] = {'parser': parser}
        if meta:
            self.register_meta(type, **meta)
602894
function Field (field, name, parent) {
  if (!(this instanceof Field)) return new Field(field, name, parent);

  debug('field <%s> being built from <%s>', name, field);
  Entry.call(this, field, name, parent);
  this._context = parent._context;
  this._this = parent._this;

  if (typeof this._content !== 'string') {
    this._compiled = function () {
      return this._content;
    }.bind(this);
  } else {
    this._compiled = _.template(this._content);
  }
}
1308830
void addField(final String name, final boolean value)
            throws IllegalStateException {

        addField(name, Boolean.toString(value));

    }
181862
def register(name: str):
    
    def decorator(cls: Type['CoverageExtractor']):
        cls.register(name)
        return cls
    return decorator
284121
public void setName(String name) {
		if (name == null) {
			throw new IllegalArgumentException("Field name cannot be null");
		}

		if (name.length() == 0 || name.length() > 10) {
			throw new IllegalArgumentException("Field name should be of length 0-10");
		}
		if (!DBFUtils.isPureAscii(name)) {
			throw new IllegalArgumentException("Field name must be ASCII");
		}
		this.name = name;
	}
423500
def regex(name, regexp, options = {})
      field name, RegexField.new(regexp, options)
    end
592747
def add_field(self, name, default_value=None):
        """"""
        self._fields[name] = default_value

        def func(cluster):
            return self.get(name, cluster)

        setattr(self, name, func)
1149374
public void declareRequestedFieldname(String name) {
        if (name.endsWith(".*")) {
            stringSetValues.put(name, new HashMap<>());
            stringSetPrefixes.put(name.substring(0, name.length() - 1), name);
        }
    }
136454
def register(self, plugin, name=None):
        
        plugin_name = name or self.get_canonical_name(plugin)

        if plugin_name in self._name2plugin or plugin in self._plugin2hookcallers:
            if self._name2plugin.get(plugin_name, -1) is None:
                return  # blocked plugin, return None to indicate no registration
            raise ValueError(
                "Plugin already registered: %s=%s\n%s"
                % (plugin_name, plugin, self._name2plugin)
            )

        # XXX if an error happens we should make sure no state has been
        # changed at point of return
        self._name2plugin[plugin_name] = plugin

        # register matching hook implementations of the plugin
        self._plugin2hookcallers[plugin] = hookcallers = []
        for name in dir(plugin):
            hookimpl_opts = self.parse_hookimpl_opts(plugin, name)
            if hookimpl_opts is not None:
                normalize_hookimpl_opts(hookimpl_opts)
                method = getattr(plugin, name)
                hookimpl = HookImpl(plugin, plugin_name, method, hookimpl_opts)
                hook = getattr(self.hook, name, None)
                if hook is None:
                    hook = _HookCaller(name, self._hookexec)
                    setattr(self.hook, name, hook)
                elif hook.has_spec():
                    self._verify_hook(hook, hookimpl)
                    hook._maybe_apply_history(hookimpl)
                hook._add_hookimpl(hookimpl)
                hookcallers.append(hook)
        return plugin_name
918977
def field(name, klass, stringify = nil, default = nil, validate = nil, msg ='')
      fields << name

      # getter
      define_method name do
        instance_variable_get( "@#{name}" )
      end

      # setter (includes validations)
      define_method "#{name}=" do | val |
        if val.nil? && default
          # Leave value as nil, so that default is used.
        elsif validate.kind_of?(Regexp)
          unless val =~ validate
            raise InvalidError, "#{val} does not match Regexp #{validate} for field #{name}"
          end
        elsif validate.respond_to?(:call) # Proc with value as argument
          unless validate.call(val)
            raise InvalidError, "#{val} does not pass validation Proc for field #{name}"
          end
        end

        instance_variable_set( "@#{name}", val )
      end

      # to_ach
      define_method  "#{name}_to_ach" do
        val = instance_variable_get( "@#{name}" )

        if val.nil?
          if default.kind_of?(Proc)
            val = default.call
          elsif default
            val = default
          else
            raise RuntimeError, "val of #{name} is nil"
          end
        end

        if val.kind_of?(String)
          if RUBY_VERSION < '1.9'
            val = Iconv.conv('ASCII//IGNORE', 'UTF8', val)
          else
            val = val.encode Encoding.find('ASCII'), ENCODING_OPTIONS
          end
        end

        if stringify
          stringify.call(val)
        else
          val
        end
      end
    end
609898
function (name, id, bytes, parser) {
  this.name = name;
  this.id = id;
  this.bytes = bytes;

  // the parser is null by default, otherwise the specified function
  this.parser = _.isFunction(parser) ? parser : function () {};
}
89272
def bind(self, name, filterset):
        
        if self.name is not None:
            name = self.name
        self.field.bind(name, self)
1190771
def _register(self, name):
        
        templatehook = TemplateHook()
        self._registry[name] = templatehook
        return templatehook