All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.codehaus.mojo.license.LicenseUrlReplacement Maven / Gradle / Ivy

There is a newer version: 2.4.0
Show newest version
package org.codehaus.mojo.license;

/*
 * #%L
 * License Maven Plugin
 * %%
 * Copyright (C) 2018 Codehaus
 * %%
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Lesser Public License for more details.
 *
 * You should have received a copy of the GNU General Lesser Public
 * License along with this program.  If not, see
 * .
 * #L%
 */

import java.util.regex.Pattern;

/**
 * Defines a license url pattern and replacement pair.
 *
 * @since 1.17
 */
public class LicenseUrlReplacement
{
    /**
     * Regular expression used to identify license urls that are to be replaced.
     *
     * @since 1.17
     */
    private Pattern regexp;

    /**
     * Replacement license url.
     *
     * 

Be aware that the replacement is passed to {@link java.util.regex.Matcher#replaceAll(String) * java.util.regex.Matcher#replaceAll(String)}, so be aware of the significance of backslashes (\) * and dollar signs ($) within the replacement string. * * @since 1.17 */ private String replacement; Pattern getRegexp() { return regexp; } @SuppressWarnings( "unused" ) public void setRegexp( final String regexp ) { this.regexp = Pattern.compile( regexp ); } String getReplacement() { return replacement; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy