Attempts to find a wrapper mapping. It follows the following rules:

 1) It tries to find a wrapper for the current form
 2) If not, it tries to find a config
329891
def find_wrapper_mapping(input_type)
      if options[:wrapper_mappings] && options[:wrapper_mappings][input_type]
        options[:wrapper_mappings][input_type]
      else
        SimpleForm.wrapper_mappings && SimpleForm.wrapper_mappings[input_type]
      end
    end
894221
def _get_wrapper(self):
        
        if self.args_type == "MODULE_FUNCTION":
            return getattr(self.obj, self.prop)
        elif self.args_type == "FUNCTION":
            return getattr(self.g, self.obj.__name__)
        elif self.args_type == "PURE":
            return getattr(self.pure, "func")
        else:
            ErrorHandler.wrapper_object_not_found_error()
1198517
protected Map<String, FunctionConfiguration> getFunctionConfigurations(final AnnotationHandler handler,
                                                                           final Set<Method> methods) throws Exception {
        info("");
        info(GENERATE_CONFIG);
        final Map<String, FunctionConfiguration> configMap = handler.generateConfigurations(methods);
        if (configMap.size() == 0) {
            info(GENERATE_SKIP);
        } else {
            final String scriptFilePath = getScriptFilePath();
            configMap.values().forEach(config -> config.setScriptFile(scriptFilePath));
            info(GENERATE_DONE);
        }

        return configMap;
    }
927117
def create_and_configure_wrapper(context_or_world):
    
    # Create default driver wrapper
    context_or_world.driver_wrapper = DriverWrappersPool.get_default_wrapper()
    context_or_world.utils = context_or_world.driver_wrapper.utils

    # Get behave userdata properties to override config properties
    try:
        behave_properties = context_or_world.config.userdata
    except AttributeError:
        behave_properties = None

    # Configure wrapper
    context_or_world.driver_wrapper.configure(context_or_world.config_files, behave_properties=behave_properties)

    # Copy config object
    context_or_world.toolium_config = context_or_world.driver_wrapper.config

    # Configure logger
    context_or_world.logger = logging.getLogger(__name__)
293134
def find_matching_middleware(self, method, path):
        
        for mw in self.mw_list:
            if not mw.matches_method(method):
                continue

            # get the path matching this middleware and the 'rest' of the url
            # (i.e. the part that comes AFTER the match) to be potentially
            # matched later by a subchain
            path_match, rest_url = mw.path_split(path)
            if self.should_skip_middleware(mw, path_match, rest_url):
                continue

            yield mw, path_match, rest_url
1208704
private MethodHandle findConstructor() {
    try {
      MethodHandle mh = MethodHandles.publicLookup().findConstructor(clazz,
          MethodType.methodType(void.class, getIdType()));
      return mh;
    } catch (NoSuchMethodException | IllegalAccessException exp) {
      String pattern = "Class %s requires a public constructor with one parameter of type %s";
      String error = String.format(pattern, clazz.getName(), getIdType());
      throw new EntityManagerException(error, exp);
    }
  }
873264
def try_binding(self):
        
        with self._lock:
            if self.reference is not None:
                # Already bound
                return

            if self._pending_ref is not None:
                # Get the reference we chose to keep this component valid
                ref = self._pending_ref
                self._pending_ref = None
            else:
                # Get the first matching service
                ref = self._context.get_service_reference(
                    self.requirement.specification, self.requirement.filter
                )

            if ref is not None:
                # Found a service
                self.on_service_arrival(ref)
795229
def map(*args)
      options = args.extract_options!
      raise ArgumentError, "Usage: map 'search' [, 'search2', ...] :to => 'replace'" unless args.any? && options[:to].is_a?(String)
      args.each do |search|
        self.mappings << Mapping.new(search, options[:to])
      end
    end
1269755
def _tryMatch(self, textToMatchObject):
        
        for rule in self.context.rules:
            ruleTryMatchResult = rule.tryMatch(textToMatchObject)
            if ruleTryMatchResult is not None:
                _logger.debug('\tmatched rule %s at %d in included context %s/%s',
                              rule.shortId(),
                              textToMatchObject.currentColumnIndex,
                              self.context.parser.syntax.name,
                              self.context.name)
                return ruleTryMatchResult
        else:
            return None
446016
def _map_name(self, name, mapper):
        
        if mapper is not None:
            if isinstance(mapper, basestring):
                name = mapper + name
            try:
                name = mapper[name]
            except KeyError:
                pass
        return name
896504
function (config, base, parent) {
        var key,
            sub,
            find,
            item;
        base = base || config;
        parent = parent || {ref: config, key: null};
        var subFlag = false;

        for (key in config) {
            if (config.hasOwnProperty(key)) {
                // If the value is an "Object" or an "Array" drill into it

                if (isIterable(config[key])) {
                    // parent param {ref: config, key: key} is a recursion
                    // pointer that needed only when replacing "keys"
                    subFlag = this._applySubstitutions(config[key], base, {ref: config, key: key}) || subFlag;

                } else {
                    // Test if the key is a "substitution" key
                    sub = SUBMATCH.exec(key);
                    if (sub && (sub[0] === key)) {
                        subFlag = true;
                        // Pull out the key to "find"
                        find = extract(base, sub[1], null);

                        if (isA(find, Object)) {
                            // Remove the "substitution" key
                            delete config[key];

                            // Add the keys founds
                            // This should be inline at the point where the "substitution" key was.
                            // Currently they will be added out of order on the end of the map.
                            for (item in find) {
                                if (find.hasOwnProperty(item)) {
                                    if (!parent.ref[parent.key]) {
                                        parent.ref[item] = find[item];
                                    } else {
                                        parent.ref[parent.key][item] = find[item];
                                    }
                                }
                            }
                        } else {
                            config[key] = '--YCB-SUBSTITUTION-ERROR--';
                        }

                    } else if (SUBMATCH.test(config[key])) {
                        subFlag = true;
                        // Test if the value is a "substitution" value
                        // We have a match so lets use it
                        sub = SUBMATCH.exec(config[key]);
                        // Pull out the key to "find"
                        find = sub[1];
                        // First see if it is the whole value
                        if (sub[0] === config[key]) {
                            // Replace the whole value with the value found by the sub string
                            find = extract(base, find, null);
                            // If we have an array in an array do it "special like"
                            if (isA(find, Array) && isA(config, Array)) {
                                // This has to be done on the parent or the reference is lost
                                // The whole {ref: config, key: key} is needed only when replacing "keys"
                                parent.ref[parent.key] = config.slice(0, parseInt(key, 10))
                                    .concat(find)
                                    .concat(config.slice(parseInt(key, 10) + 1));
                            } else {
                                config[key] = find;
                            }
                        } else {
                            // If not it's just part of the whole value
                            config[key] = config[key]
                                .replace(SUBMATCHES, replacer(base));
                        }
                    }
                }
            }
        }
        return subFlag;
    }
708401
function(bundle, callback){
        var configuration = Config.getInstance(bundle);

        console.log("getting for bundle ", bundle, configuration);
        if ( typeof(configuration) != 'undefined' ) {
            //Response.
            var confObj = {
                model : configuration.content.model,
                path : configuration.modelsPath
            };
            callback(false, confObj);
        } else {
            callback('Config not instantiated')
        }
    }
386677
def _wrapper_enabled?
        return false unless request.has_content_type?

        ref = request.content_mime_type.ref
        _wrapper_formats.include?(ref) && _wrapper_key && !request.parameters.key?(_wrapper_key)
      end
605777
def find_method_params(self):
        
        req = self.request
        args = req.controller_info["method_args"]
        kwargs = req.controller_info["method_kwargs"]
        return args, kwargs
1005894
private void checkForeignKeyMapping(List<String> errors, Config config) {
        for (Entity entity : config.getProject().getEntities().getList()) {
            for (Relation relation : entity.getRelations().getList()) {
                if (relation.isInverse() || relation.isIntermediate()) {
                    continue;
                }

                for (AttributePair attributePair : relation.getAttributePairs()) {
                    if (attributePair.getFromAttribute().getMappedType() != attributePair.getToAttribute().getMappedType()) {
                        String errorMsg = "Inconsistent types: Column " + attributePair.getFromAttribute().getFullColumnName() + "["
                                + attributePair.getFromAttribute().getJdbcType() + "] references column " + attributePair.getToAttribute().getFullColumnName()
                                + "[" + attributePair.getToAttribute().getJdbcType() + "]. " + "You should really fix your SQL schema.";
                        if (attributePair.getFromAttribute().isInCpk()) {
                            // we may get compile failure as the property is mapped (inside the cpk)
                            log.warn(errorMsg + ". To avoid this error you can force the mapped type using configuration.");
                        } else {
                            // we should not get compile failure as the property is not mapped.
                            log.warn(errorMsg);
                        }
                    }
                }
            }
        }
    }
523575
function (config) {
        if (typeof config !== 'object') {
            throw new Error('Invalid Route Config');
        }
        if (typeof config.route !== 'string') {
            var name_1 = config.name || '(no name)';
            throw new Error('Invalid Route Config for "' + name_1 + '": You must specify a "route:" pattern.');
        }
        if (!('redirect' in config || config.moduleId || config.navigationStrategy || config.viewPorts)) {
            throw new Error('Invalid Route Config for "' + config.route + '": You must specify a "moduleId:", "redirect:", "navigationStrategy:", or "viewPorts:".');
        }
    }
406156
function _map_to_try(doc_key, map_field, item_key){

		    var retlbl = null;

		    var map_str = anchor.get_doc_field(doc_key, map_field);

		    if( map_str && bbop.core.what_is(map_str) == 'string' ){

			// First, check the cache. If it's not there
			// add it.
			if( ! bbop.core.is_defined(anchor._doc_label_maps[doc_key]) ){
			    anchor._doc_label_maps[doc_key] = {};
			}
			if( ! bbop.core.is_defined(anchor._doc_label_maps[doc_key][map_field]) ){
			    // It looks like a map wasn't defined, so let's
			    // convert it into JSON now.
			    anchor._doc_label_maps[doc_key][map_field] =
				bbop.json.parse(map_str);
			}

			// Pull our map out of the cache.
			var map = anchor._doc_label_maps[doc_key][map_field];

			// Probe to see if we have anything in the map.
			if( map && map[item_key] ){
			    retlbl = map[item_key];
			}
		    }

		    return retlbl;
		}