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

hudson.plugins.analysis.tokens.AbstractFixedAnnotationsTokenMacro Maven / Gradle / Ivy

The newest version!
package hudson.plugins.analysis.tokens;

import hudson.plugins.analysis.core.BuildResult;
import hudson.plugins.analysis.core.ResultAction;

/**
 * Provides a token that evaluates to the number of fixed annotations found by a
 * plug-in.
 *
 * @author Ulli Hafner
 */
public class AbstractFixedAnnotationsTokenMacro extends AbstractTokenMacro {
    /**
     * Creates a new instance of {@link AbstractFixedAnnotationsTokenMacro}.
     * @param tokenName
     *            the name of the token
     * @param resultActions
     *            associated actions containing the build result
     */
    public AbstractFixedAnnotationsTokenMacro(final String tokenName,
            final Class>... resultActions) {
        super(tokenName, resultActions);
    }

    @Override
    protected String evaluate(final BuildResult result) {
        return String.valueOf(result.getNumberOfFixedWarnings());
    }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy