Take all resolved strings from a context object and apply them to this context.
Useful for passing resolved values up a tag hierarchy.

@param context - context object to apply resolved values from.
510624
public void addResolvedFrom(Context context) {
    context.getResolvedExpressions().forEach(this::addResolvedExpression);
    context.getResolvedFunctions().forEach(this::addResolvedFunction);
    context.getResolvedValues().forEach(this::addResolvedValue);
  }
831617
private synchronized void addContext(final EvaluatorContext context) {
    this.contextStack.add(context);
    this.contextIds.add(context.getId());
  }
940995
private void applyDefinitionsDocumentExtension(Context context) {
        extensionRegistry.getDefinitionsDocumentExtensions().forEach(extension -> extension.apply(context));
    }
402750
private void applyPathsDocumentExtension(Context context) {
        extensionRegistry.getPathsDocumentExtensions().forEach(extension -> extension.apply(context));
    }
267380
public static void init(Context context) {
    String apiKey = readApiKey(context);
    init(context, apiKey);
  }
1207521
public ResourceAddress resolve(StatementContext context, List<String> wildcards) {
        Resolution<ModelNode> resolution = new Resolution<ModelNode>() {
             private ModelNode modelNode;

             @Override
             public void init() {
                 this.modelNode = new ModelNode();
             }

             @Override
             public void addKeyValue(String key, String value) {
                 this.modelNode.add(key, value);
             }

             @Override
             public ModelNode getResult() {
                 return modelNode;
             }
         };

         _resolve(context, wildcards, resolution);

         return new ResourceAddress(resolution.getResult());
    }
178535
@Override
    public void initialize(ExtensionContext context) {
        // IMPORTANT: Management API version != xsd version! Not all Management API changes result in XSD changes
        SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, InfinispanSchema.CURRENT.getVersion());
        // Create the path resolver handler
        final ResolvePathHandler resolvePathHandler;
        final PathManager pathManager;
        if (context.getProcessType().isServer()) {
            resolvePathHandler = ResolvePathHandler.Builder.of(context.getPathManager())
                    .setPathAttribute(FileStoreResource.PATH)
                    .setRelativeToAttribute(FileStoreResource.RELATIVE_TO)
                    .build();
            pathManager = context.getPathManager();
        } else {
            resolvePathHandler = null;
            pathManager = null;
        }

        subsystem.registerSubsystemModel(InfinispanSubsystemRootResource.create(resolvePathHandler, pathManager, context.isRuntimeOnlyRegistrationValid()));
        subsystem.registerXMLElementWriter(InfinispanSubsystemXMLWriter::new);
    }
1020310
static final Context context(Element match, int matchIndex, int matchSize) {
        return new DefaultContext(match, matchIndex, matchSize);
    }
338052
public void init(HttpInboundServiceContext context) {
        this.message = context.getRequest();
        if (this.useEE7Streams) {
            this.body = new HttpInputStreamEE7(context);
        } else {
            this.body = new HttpInputStreamImpl(context);
        }
    }
314239
@com.fasterxml.jackson.annotation.JsonProperty("Context")
    public void setContext(String context) {
        this.context = context;
    }
891812
@Override
    public void setContext(DisplayContext context) {
        super.setContext(context);
        if (!capitalizationInfoIsSet &&
              (context==DisplayContext.CAPITALIZATION_FOR_UI_LIST_OR_MENU || context==DisplayContext.CAPITALIZATION_FOR_STANDALONE)) {
            initCapitalizationContextInfo(fLocale);
            capitalizationInfoIsSet = true;
        }
        if (capitalizationBrkIter == null && (context==DisplayContext.CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE ||
              (context==DisplayContext.CAPITALIZATION_FOR_UI_LIST_OR_MENU && capitalizationOfRelativeUnitsForListOrMenu) ||
              (context==DisplayContext.CAPITALIZATION_FOR_STANDALONE && capitalizationOfRelativeUnitsForStandAlone) )) {
            capitalizationBrkIter = BreakIterator.getSentenceInstance(fLocale);
        }
    }
1335709
private void applyOverviewDocumentExtension(Context context) {
        extensionRegistry.getOverviewDocumentExtensions().forEach(extension -> extension.apply(context));
    }
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);
		}
	}
579094
@Initialize(scope = Scope.SCENARIO)
    public void initializeContextVariables() {
        Properties p = new HandlerConfigLoader().loadProperties(configurationManager, "context");
        for ( Map.Entry e : p.entrySet()) {
            ChorusContext.getContext().put(e.getKey().toString(), e.getValue().toString());
        }
    }
1283461
protected final void closeContext(GenerationContext context) {
		boolean runPostElements = false;
		GenerationContext selectedContext = null;
		synchronized (this) {
			final Iterator<GenerationContext> iterator = this.bufferedContexes.iterator();
			while (selectedContext == null && iterator.hasNext()) {
				final GenerationContext candidate = iterator.next();
				if (Objects.equal(candidate.getTypeIdentifier(), context.getTypeIdentifier())) {
					runPostElements = candidate.getParentContext() == null;
					selectedContext = candidate;
				}
			}
		}
		if (selectedContext == null) {
			throw new IllegalStateException("Not same contexts when closing"); //$NON-NLS-1$
		}
		if (runPostElements) {
			for (final Runnable handler : selectedContext.getPostFinalizationElements()) {
				handler.run();
			}
		}
		synchronized (this) {
			final Iterator<GenerationContext> iterator = this.bufferedContexes.iterator();
			while (iterator.hasNext()) {
				final GenerationContext candidate = iterator.next();
				if (selectedContext == candidate) {
					candidate.setParentContext(null);
					iterator.remove();
					return;
				}
			}
		}
	}
605778
function Context(resolve, reject, custom) {
    this.resolve = resolve;
    this.reject = reject;
    this.custom = custom;
  }
1277744
private synchronized void removeContext(final EvaluatorContext context) {
    this.contextStack.remove(context);
    this.contextIds.remove(context.getId());
  }