Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.maven.model.interpolation;
import java.io.File;
import java.lang.reflect.Array;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.apache.maven.model.InputLocation;
import org.apache.maven.model.Model;
import org.apache.maven.model.building.ModelBuildingRequest;
import org.apache.maven.model.building.ModelProblem.Severity;
import org.apache.maven.model.building.ModelProblem.Version;
import org.apache.maven.model.building.ModelProblemCollector;
import org.apache.maven.model.building.ModelProblemCollectorRequest;
import org.codehaus.plexus.interpolation.InterpolationException;
import org.codehaus.plexus.interpolation.InterpolationPostProcessor;
import org.codehaus.plexus.interpolation.RecursionInterceptor;
import org.codehaus.plexus.interpolation.StringSearchInterpolator;
import org.codehaus.plexus.interpolation.ValueSource;
/**
* StringSearchModelInterpolator
* @deprecated replaced by StringVisitorModelInterpolator (MNG-6697)
*/
@Deprecated
public class StringSearchModelInterpolator extends AbstractStringBasedModelInterpolator {
private static final Map, InterpolateObjectAction.CacheItem> CACHED_ENTRIES =
new ConcurrentHashMap<>(80, 0.75f, 2);
// Empirical data from 3.x, actual =40
private interface InnerInterpolator {
String interpolate(String value);
}
@Override
public Model interpolateModel(
Model model, File projectDir, ModelBuildingRequest config, ModelProblemCollector problems) {
interpolateObject(model, model, projectDir, config, problems);
return model;
}
void interpolateObject(
Object obj, Model model, File projectDir, ModelBuildingRequest config, ModelProblemCollector problems) {
List extends ValueSource> valueSources = createValueSources(model, projectDir, config, problems);
List extends InterpolationPostProcessor> postProcessors = createPostProcessors(model, projectDir, config);
InnerInterpolator innerInterpolator = createInterpolator(valueSources, postProcessors, problems);
PrivilegedAction