Fail with error identifying unknown context type(s) that were specified.

@param unknown set of unknown context types(s) that were specified.
@param contextProviders
559962
static void failOnUnknownContextTypes(HashSet<String> unknown, ArrayList<ThreadContextProvider> contextProviders) {
        Set<String> known = new TreeSet<>(); // alphabetize for readability of message
        known.addAll(Arrays.asList(ThreadContext.ALL_REMAINING, ThreadContext.APPLICATION, ThreadContext.CDI, ThreadContext.SECURITY, ThreadContext.TRANSACTION));
        for (ThreadContextProvider provider : contextProviders) {
            String contextType = provider.getThreadContextType();
            known.add(contextType);
        }

        throw new IllegalStateException(Tr.formatMessage(tc, "CWWKC1155.unknown.context", new TreeSet<String>(unknown), known));
    }
631348
public void validate(final ValidationContext context) {
        if (!isValid()) {
            val messages = context.getMessageContext();
            messages.addMessage(new MessageBuilder()
                .error()
                .source("token")
                .defaultText("Unable to accept credential with an empty or unspecified token")
                .build());
        }
    }
1049480
public void setContext( AdapterContext context )
    {
        Object servletContext = context.getExternalContext();
        assert servletContext instanceof ServletContext : servletContext;
        _servletContext = ( ServletContext ) servletContext;
        _eventReporter = createEventReporter();
    }
61364
public void setTomcatContextCustomizers(
			Collection<? extends TomcatContextCustomizer> tomcatContextCustomizers) {
		Assert.notNull(tomcatContextCustomizers,
				"TomcatContextCustomizers must not be null");
		this.tomcatContextCustomizers = new ArrayList<>(tomcatContextCustomizers);
	}
211983
public void setCognitoIdentityProviders(java.util.Collection<CognitoIdentityProvider> cognitoIdentityProviders) {
        if (cognitoIdentityProviders == null) {
            this.cognitoIdentityProviders = null;
            return;
        }

        this.cognitoIdentityProviders = new java.util.ArrayList<CognitoIdentityProvider>(cognitoIdentityProviders);
    }
713122
public void addContextLifecycleListeners(
			LifecycleListener... contextLifecycleListeners) {
		Assert.notNull(contextLifecycleListeners,
				"ContextLifecycleListeners must not be null");
		this.contextLifecycleListeners.addAll(Arrays.asList(contextLifecycleListeners));
	}
277220
@SuppressWarnings({ "rawtypes", "unchecked" })
	protected void applyInitializers(ConfigurableApplicationContext context) {
		for (ApplicationContextInitializer initializer : getInitializers()) {
			Class<?> requiredType = GenericTypeResolver.resolveTypeArgument(
					initializer.getClass(), ApplicationContextInitializer.class);
			Assert.isInstanceOf(requiredType, context, "Unable to call initializer.");
			initializer.initialize(context);
		}
	}
831617
private synchronized void addContext(final EvaluatorContext context) {
    this.contextStack.add(context);
    this.contextIds.add(context.getId());
  }
603727
public void setContextKeyNames(java.util.Collection<String> contextKeyNames) {
        if (contextKeyNames == null) {
            this.contextKeyNames = null;
            return;
        }

        this.contextKeyNames = new com.amazonaws.internal.SdkInternalList<String>(contextKeyNames);
    }
112685
public void addContextValves(Valve... contextValves) {
		Assert.notNull(contextValves, "Valves must not be null");
		this.contextValves.addAll(Arrays.asList(contextValves));
	}
1130638
public void setInstanceTypeConfigs(java.util.Collection<InstanceTypeConfig> instanceTypeConfigs) {
        if (instanceTypeConfigs == null) {
            this.instanceTypeConfigs = null;
            return;
        }

        this.instanceTypeConfigs = new com.amazonaws.internal.SdkInternalList<InstanceTypeConfig>(instanceTypeConfigs);
    }
171522
public void setTomcatProtocolHandlerCustomizers(
			Collection<? extends TomcatProtocolHandlerCustomizer<?>> tomcatProtocolHandlerCustomizers) {
		Assert.notNull(tomcatProtocolHandlerCustomizers,
				"TomcatProtocolHandlerCustomizers must not be null");
		this.tomcatProtocolHandlerCustomizers = new ArrayList<>(
				tomcatProtocolHandlerCustomizers);
	}
728552
public MultipleDataProviderContext<DPO> read(DataProvider<DPO> dataProvider) {
        if (dataProvider != null) {
            addedDataProviders.add(dataProvider);
        }

        // Change context
        return new MultipleDataProviderContext<DPO>(addedTriggers, addedDataProviders);
    }
183303
public void unregisterProviders(Collection<?> providers) {
		ProvidedResourceScanner providedResourceScanner = new ProvidedResourceScanner(getFhirContext());
		if (providers != null) {
			for (Object provider : providers) {
				removeResourceMethods(provider);
				if (provider instanceof IResourceProvider) {
					myResourceProviders.remove(provider);
					IResourceProvider rsrcProvider = (IResourceProvider) provider;
					Class<? extends IBaseResource> resourceType = rsrcProvider.getResourceType();
					providedResourceScanner.removeProvidedResources(rsrcProvider);
				} else {
					myPlainProviders.remove(provider);
				}
				invokeDestroy(provider);
			}
		}
	}
491929
public <DPO> MultipleDataProviderContext<DPO> read(Collection<DataProvider<DPO>> dataProviders) {
        List<DataProvider<DPO>> addedDataProviders = new ArrayList<DataProvider<DPO>>();
        if (dataProviders != null) {
            addedDataProviders.addAll(dataProviders);
        }

        // Change context
        return new MultipleDataProviderContext<DPO>(addedTriggers, addedDataProviders);
    }
877176
protected final void setContext(@NonNull final Context context) {
        Condition.INSTANCE.ensureNotNull(context, "The context may not be null");
        this.context = context;
    }
164040
public void setUnknownProperties(Map<String, Object> unknownProperties) {
        this.unknownProperties = Collections.unmodifiableMap(
            new HashMap<>(unknownProperties));
    }