Private resolve() worker without any result caching.

        @param nobuiltin: Flag indicating whether resolving to XSD built-in
            types should not be allowed.
        @return: The resolved (true) type.
        @rtype: L{SchemaObject}
346779
def __resolve_type(self, nobuiltin=False):
        
        # There is no need for a recursive implementation here since a node can
        # reference an external type node but XSD specification explicitly
        # states that that external node must not be a reference to yet another
        # node.
        qref = self.qref()
        if qref is None:
            return self
        query = TypeQuery(qref)
        query.history = [self]
        log.debug("%s, resolving: %s\n using:%s", self.id, qref, query)
        resolved = query.execute(self.schema)
        if resolved is None:
            log.debug(self.schema)
            raise TypeNotFound(qref)
        if resolved.builtin() and nobuiltin:
            return self
        return resolved
174902
function resolve(x) {
                        // instanceof instead of internal slot check because we should fix it without replacement native Promise core
                        if (x instanceof $Promise && sameConstructor(x.constructor, this)) return x;
                        var capability = newPromiseCapability(this)
                            , $$resolve = capability.resolve;
                        $$resolve(x);
                        return capability.promise;
                    }
175656
def resolve_any_xref(self, env, fromdocname, builder, target,
                         node, contnode):
        
        prefix = node.get('dn:prefix')
        results = []

        match = self.find_obj(env, prefix, target, None, 1)
        if match is not None:
            (name, obj) = match
            results.append(('dn:' + self.role_for_objtype(obj[1]),
                            make_refnode(builder, fromdocname, obj[0], name, contnode,
                                         name)))
        return results
469790
@Override
    public VariableExpression visitBuiltInType(BuiltInTypeContext ctx) {
        String text;
        if (asBoolean(ctx.VOID())) {
            text = ctx.VOID().getText();
        } else if (asBoolean(ctx.BuiltInPrimitiveType())) {
            text = ctx.BuiltInPrimitiveType().getText();
        } else {
            throw createParsingFailedException("Unsupported built-in type: " + ctx, ctx);
        }

        return configureAST(new VariableExpression(text), ctx);
    }
657396
@SuppressWarnings("unchecked")
	public <B, T extends B, D extends B> B resolveBeanWithDefaultClass(Class<T> typeToResolve, Class<D> defaultType) {

		// if type to resolve is null, do nothing, not even the default
		if(typeToResolve == null) {
			return null;
		}
		
		// get candidate resolve types
		Set<Bean<?>> candidates = this.manager.getBeans(typeToResolve);
		
		// if no candidates are available, resolve
		// using next class up
		if(!candidates.iterator().hasNext()) {
			this.logger.trace("No candidates for: {}", typeToResolve.getName());
			// try and resolve only the default type
			return resolveBeanWithDefaultClass(defaultType, null);
		} 
		
		this.logger.trace("Requesting resolution on: {}", typeToResolve.getName());
		
		// get candidate
		Bean<?> bean = candidates.iterator().next();
		CreationalContext<?> context = this.manager.createCreationalContext(bean);
		Type type = (Type) bean.getTypes().iterator().next();
	    B result = (B)this.manager.getReference(bean, type, context);
		
		this.logger.trace("Resolved to: {}", result.getClass().getName());
		
		return result;
	}
569396
protected @Nonnull <T> T inject(@Nonnull BeanResolutionContext resolutionContext, @Nullable BeanDefinition requestingBeanDefinition, @Nonnull T instance) {
        @SuppressWarnings("unchecked") Class<T> beanType = (Class<T>) instance.getClass();
        Optional<BeanDefinition<T>> concreteCandidate = findConcreteCandidate(beanType, null, false, true);
        if (concreteCandidate.isPresent()) {
            BeanDefinition definition = concreteCandidate.get();
            if (requestingBeanDefinition != null && requestingBeanDefinition.equals(definition)) {
                // bail out, don't inject for bean definition in creation
                return instance;
            }
            doInject(resolutionContext, instance, definition);
        }
        return instance;
    }
255893
private static BiFunction<AnnotatedValueResolver, ResolverContext, Object>
    resolver(List<RequestObjectResolver> objectResolvers, BeanFactoryId beanFactoryId) {
        return (resolver, ctx) -> {
            Object value = null;
            for (final RequestObjectResolver objectResolver : objectResolvers) {
                try {
                    value = objectResolver.convert(ctx, resolver.elementType(), beanFactoryId);
                    break;
                } catch (FallthroughException ignore) {
                    // Do nothing.
                } catch (Throwable cause) {
                    Exceptions.throwUnsafely(cause);
                }
            }
            if (value != null) {
                return value;
            }
            throw new IllegalArgumentException("No suitable request converter found for a @" +
                                               RequestObject.class.getSimpleName() + " '" +
                                               resolver.elementType().getSimpleName() + '\'');
        };
    }
210280
def configureAndBuild(self, nocompressjs=False):
        
        jsb = self.createCleanJsbConfig()
        self.buildFromJsbString(jsb, nocompressjs)
201623
private @NotNull <T> Optional<Instantiator<T>> implicitInstantiatorFrom(@NotNull Constructor<T> constructor, @NotNull NamedTypeList types) {
        if (!isPublic(constructor.getModifiers()))
            return Optional.empty();

        List<String> columnNames = types.getNames();
        return findTargetTypes(constructor, columnNames)
                .flatMap(targetTypes -> resolveConversions(types, targetTypes)
                        .map(conversions -> new ReflectionInstantiator<>(constructor, conversions, createPropertyAccessorsForValuesNotCoveredByConstructor(constructor, columnNames))));
    }
1026716
@SuppressWarnings("unchecked")
    public EntityFunction resolveType(final Class<? extends Entity> type) {
	// Check already resolved
	EntityFunction resolvedType = resolved.get(Objects.requireNonNull(type));
	if (resolvedType != null) {
	    return resolvedType;
	}

	// Log type
	logger.info(String.format("Resolving type %s", type));

	// Check not entity
	if (Entity.class.equals(type)) {
	    throw new IllegalArgumentException("Entity is not a valid Entity subclass");
	}

	// Check is interface
	if (!type.isInterface()) {
	    throw new IllegalArgumentException(String.format("Type %s is not an interface", type));
	}

	// Check type parameters
	if (type.getTypeParameters().length > 0) {
	    throw new IllegalArgumentException(String.format("Type %s cannot take type parameters", type));
	}

	// Build method map
	final Map<Method, EntityMethod> methodMap = new HashMap<>();
	final Set<Class<? extends Entity>> totalDependencies = new HashSet<>();
	for (final Method m : type.getDeclaredMethods()) {
	    // Check static
	    if (Modifier.isStatic(m.getModifiers())) {
		// Ignore static methods as not invoked on instance
		continue;
	    }
	    // Process functions
	    for (final EntityMethodFunction methodFunction : functions) {
		// Log method
		logger.fine(String.format("Resolving method %s with function %s", m, methodFunction.getClass()));
		// Resolve method
		final EntityMethod em = methodFunction.apply(m);
		if (em != null) {
		    // Resolved method
		    if (methodMap.put(m, em) != null) {
			throw new IllegalArgumentException(
				String.format("Method %s of type %s had multiple function hits", m, type));
		    }
		    // Add dependencies to be resolved
		    totalDependencies.addAll(em.getDependencies());
		}
	    }
	    // Check method could be resolved
	    if (!methodMap.containsKey(m)) {
		throw new IllegalArgumentException(String.format("Method %s of type %s had no resolver hits", m, type));
	    }
	}

	// Created resolved type
	resolvedType = new EntityFunction(type, methodMap);
	resolved.put(type, resolvedType);

	// Resolve dependencies
	totalDependencies.forEach(this::resolveType);

	// Resolve parents
	for (final Class<?> parent : type.getInterfaces()) {
	    // Ignore if entity
	    if (Entity.class.equals(parent)) {
		continue;
	    }

	    // Check if entity subclass
	    if (!Entity.class.isAssignableFrom(parent)) {
		throw new IllegalArgumentException(
			String.format("Parent type %s of type %s is not an Entity", parent, type));
	    }

	    // Resolve dependency
	    resolveType((Class<? extends Entity>) parent);
	}

	return resolvedType;
    }
317113
@Override
    ResolveResult<? extends AbstractConfigValue> resolveSubstitutions(ResolveContext context, ResolveSource source) {
        ResolveContext newContext = context.addCycleMarker(this);
        AbstractConfigValue v;
        try {
            ResolveSource.ResultWithPath resultWithPath = source.lookupSubst(newContext, expr, prefixLength);
            newContext = resultWithPath.result.context;

            if (resultWithPath.result.value != null) {
                if (ConfigImpl.traceSubstitutionsEnabled())
                    ConfigImpl.trace(newContext.depth(), "recursively resolving " + resultWithPath
                            + " which was the resolution of " + expr + " against " + source);

                ResolveSource recursiveResolveSource = (new ResolveSource(
                        (AbstractConfigObject) resultWithPath.pathFromRoot.last(), resultWithPath.pathFromRoot));

                if (ConfigImpl.traceSubstitutionsEnabled())
                    ConfigImpl.trace(newContext.depth(), "will recursively resolve against " + recursiveResolveSource);

                ResolveResult<? extends AbstractConfigValue> result = newContext.resolve(resultWithPath.result.value,
                        recursiveResolveSource);
                v = result.value;
                newContext = result.context;
            } else {
                ConfigValue fallback = context.options().getResolver().lookup(expr.path().render());
                v = (AbstractConfigValue) fallback;
            }
        } catch (NotPossibleToResolve e) {
            if (ConfigImpl.traceSubstitutionsEnabled())
                ConfigImpl.trace(newContext.depth(),
                        "not possible to resolve " + expr + ", cycle involved: " + e.traceString());
            if (expr.optional())
                v = null;
            else
                throw new ConfigException.UnresolvedSubstitution(origin(), expr
                        + " was part of a cycle of substitutions involving " + e.traceString(), e);
        }

        if (v == null && !expr.optional()) {
            if (newContext.options().getAllowUnresolved())
                return ResolveResult.make(newContext.removeCycleMarker(this), this);
            else
                throw new ConfigException.UnresolvedSubstitution(origin(), expr.toString());
        } else {
            return ResolveResult.make(newContext.removeCycleMarker(this), v);
        }
    }
15894
function resolve(opt) {
	if (opt instanceof Serializers.Base) {
		return opt;
	} else if (_.isString(opt)) {
		let SerializerClass = getByName(opt);
		if (SerializerClass)
			return new SerializerClass();
		else
			throw new BrokerOptionsError(`Invalid serializer type '${opt}'.`, { type: opt });

	} else if (_.isObject(opt)) {
		let SerializerClass = getByName(opt.type || "JSON");
		if (SerializerClass)
			return new SerializerClass(opt.options);
		else
			throw new BrokerOptionsError(`Invalid serializer type '${opt.type}'.`, { type: opt.type });
	}

	return new Serializers.JSON();
}
171766
@Override
  public Class<?> loadClassImpl(String name, boolean resolve)
    throws ClassNotFoundException
  {
    // The JVM has already cached the classes, so we don't need to
    Class<?> cl = findLoadedClass(name);

    if (cl != null) {
      if (resolve)
        resolveClass(cl);
      return cl;
    }
    // System.out.println("ROOT: " + name);
    if (_classNotFoundCache.get(name) != null) {
      return null;
    }
    
    try {
      cl = super.loadClassImpl(name, resolve);
    } catch (ClassNotFoundException e) {
      _classNotFoundCache.put(name, name);
      
      throw e;
    }
    
    if (cl == null) {
      _classNotFoundCache.put(name, name);
    }
    
    return cl;
  }
1237986
public static PropertyResolver createPrefixedResolver(final PropertyResolver resolver, String providerName, String pluginType) {
        final String projectPrefix = projectPropertyPrefix(pluginPropertyPrefix(pluginType, providerName));
        final String frameworkPrefix = frameworkPropertyPrefix(pluginPropertyPrefix(pluginType, providerName));
        return new PropertyResolver(){
            public Object resolvePropertyValue(String name, PropertyScope scope) {
                String value = null;
                if (scope.isInstanceLevel()) {
                    value = (String)resolver.resolvePropertyValue(name,scope);
                }
                if (null != value || scope == PropertyScope.InstanceOnly) {
                    return value;
                }

                if (scope.isProjectLevel()) {
                    value = (String) resolver.resolvePropertyValue(projectPrefix + name, scope);
                }
                if (null != value || scope == PropertyScope.ProjectOnly) {
                    return value;
                }

                value = (String) resolver.resolvePropertyValue(frameworkPrefix + name, scope);
                return value;
            }
        };

    }
1256344
@SuppressWarnings("unchecked")
    private static <V> V resolve(ProvidenceConfigContext context,
                                 Token token,
                                 Tokenizer tokenizer,
                                 PDescriptor descriptor) throws TokenizerException {
        Object value = resolveAny(context, token, tokenizer);
        if (value == null) {
            return null;
        }
        return (V) asType(descriptor, value);
    }
1074368
static private ResultWithPath findInObject(AbstractConfigObject obj, ResolveContext context, Path path)
            throws NotPossibleToResolve {
        // resolve ONLY portions of the object which are along our path
        if (ConfigImpl.traceSubstitutionsEnabled())
            ConfigImpl.trace("*** finding '" + path + "' in " + obj);
        Path restriction = context.restrictToChild();
        ResolveResult<? extends AbstractConfigValue> partiallyResolved = context.restrict(path).resolve(obj,
                new ResolveSource(obj));
        ResolveContext newContext = partiallyResolved.context.restrict(restriction);
        if (partiallyResolved.value instanceof AbstractConfigObject) {
            ValueWithPath pair = findInObject((AbstractConfigObject) partiallyResolved.value, path);
            return new ResultWithPath(ResolveResult.make(newContext, pair.value), pair.pathFromRoot);
        } else {
            throw new ConfigException.BugOrBroken("resolved object to non-object " + obj + " to " + partiallyResolved);
        }
    }
304734
function resolveReducer (manager, accumulator, reducer) {
  // this conditional is here because BaseEntity#resolve
  // does not check that lifecycle methods are defined
  // before trying to resolve them
  if (!reducer) {
    return Promise.resolve(accumulator)
  }

  const isTracing = accumulator.trace

  const acc = isTracing
    ? trace.augmentAccumulatorTrace(accumulator, reducer)
    : accumulator

  const traceNode = acc.traceNode

  const resolve = getResolveFunction(reducer)

  // NOTE: recursive call
  let result = resolve(manager, resolveReducer, acc, reducer)

  if (hasDefault(reducer)) {
    const _default = reducer[DEFAULT_VALUE].value
    const resolveDefault = reducers.ReducerDefault.resolve
    result = result.then(acc => resolveDefault(acc, _default))
  }

  if (isTracing) {
    result = result.then(trace.augmentTraceNodeDuration(traceNode))
  }

  return result
}