com.github.robtimus.maven.plugins.buildhelper.Messages Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of build-helper-maven-plugin Show documentation
Show all versions of build-helper-maven-plugin Show documentation
A plugin that contains several utility goals
/*
* Messages.java
* Copyright 2023 Rob Spoor
*
* Licensed 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.
*/
// This file has been generated by i18n-maven-plugin
// (https://robtimus.github.io/i18n-maven-plugin/)
package com.github.robtimus.maven.plugins.buildhelper;
import java.util.Locale;
import java.util.Map;
import java.util.ResourceBundle;
import java.util.concurrent.ConcurrentHashMap;
@SuppressWarnings("nls")
final class Messages {
private static final Map BUNDLES = new ConcurrentHashMap<>();
private Messages() {
throw new IllegalStateException("cannot create instances of " + getClass().getName());
}
private static ResourceBundle getResourceBundle(Locale locale) {
Locale l = nonNull(locale);
return BUNDLES.computeIfAbsent(l, k -> ResourceBundle.getBundle("com.github.robtimus.maven.plugins.buildhelper.build-helper-maven-plugin", l));
}
private static String getString(Locale locale, String key) {
ResourceBundle bundle = getResourceBundle(locale);
return bundle.getString(key);
}
private static Locale nonNull(Locale locale) {
return locale != null ? locale : Locale.getDefault(Locale.Category.FORMAT);
}
static final License_ license = new License_();
static final class License_ {
private License_() {
super();
}
String fileFound(Object arg) {
return fileFound(null, arg);
}
String fileFound(Locale locale, Object arg) {
Locale l = nonNull(locale);
String s = getString(l, "license.fileFound");
return String.format(l, s, arg);
}
String fileNotFound(
Object arg1,
Object arg2) {
return fileNotFound(null,
arg1,
arg2
);
}
String fileNotFound(Locale locale,
Object arg1,
Object arg2) {
Locale l = nonNull(locale);
String s = getString(l, "license.fileNotFound");
return String.format(l, s,
arg1,
arg2
);
}
String invalidFilename(Object arg) {
return invalidFilename(null, arg);
}
String invalidFilename(Locale locale, Object arg) {
Locale l = nonNull(locale);
String s = getString(l, "license.invalidFilename");
return String.format(l, s, arg);
}
String leavingGitProject() {
return leavingGitProject(null);
}
String leavingGitProject(Locale locale) {
Locale l = nonNull(locale);
return getString(l, "license.leavingGitProject");
}
String leavingMavenProject() {
return leavingMavenProject(null);
}
String leavingMavenProject(Locale locale) {
Locale l = nonNull(locale);
return getString(l, "license.leavingMavenProject");
}
String skipped() {
return skipped(null);
}
String skipped(Locale locale) {
Locale l = nonNull(locale);
return getString(l, "license.skipped");
}
}
static final JarLicense_ jarLicense = new JarLicense_();
static final class JarLicense_ {
private JarLicense_() {
super();
}
String addedResource(Object arg) {
return addedResource(null, arg);
}
String addedResource(Locale locale, Object arg) {
Locale l = nonNull(locale);
String s = getString(l, "jarLicense.addedResource");
return String.format(l, s, arg);
}
}
static final JavadocLicense_ javadocLicense = new JavadocLicense_();
static final class JavadocLicense_ {
private JavadocLicense_() {
super();
}
String copiedLicense(
Object arg1,
Object arg2) {
return copiedLicense(null,
arg1,
arg2
);
}
String copiedLicense(Locale locale,
Object arg1,
Object arg2) {
Locale l = nonNull(locale);
String s = getString(l, "javadocLicense.copiedLicense");
return String.format(l, s,
arg1,
arg2
);
}
}
static final SiteIndex_ siteIndex = new SiteIndex_();
static final class SiteIndex_ {
private SiteIndex_() {
super();
}
String generated(
Object arg1,
Object arg2) {
return generated(null,
arg1,
arg2
);
}
String generated(Locale locale,
Object arg1,
Object arg2) {
Locale l = nonNull(locale);
String s = getString(l, "siteIndex.generated");
return String.format(l, s,
arg1,
arg2
);
}
String noEncoding(Object arg) {
return noEncoding(null, arg);
}
String noEncoding(Locale locale, Object arg) {
Locale l = nonNull(locale);
String s = getString(l, "siteIndex.noEncoding");
return String.format(l, s, arg);
}
String projectRoot(Object arg) {
return projectRoot(null, arg);
}
String projectRoot(Locale locale, Object arg) {
Locale l = nonNull(locale);
String s = getString(l, "siteIndex.projectRoot");
return String.format(l, s, arg);
}
String removedBadgeWithLink(
Object arg1,
Object arg2,
Object arg3) {
return removedBadgeWithLink(null,
arg1,
arg2,
arg3
);
}
String removedBadgeWithLink(Locale locale,
Object arg1,
Object arg2,
Object arg3) {
Locale l = nonNull(locale);
String s = getString(l, "siteIndex.removedBadgeWithLink");
return String.format(l, s,
arg1,
arg2,
arg3
);
}
String removedBadgeWithoutLink(
Object arg1,
Object arg2) {
return removedBadgeWithoutLink(null,
arg1,
arg2
);
}
String removedBadgeWithoutLink(Locale locale,
Object arg1,
Object arg2) {
Locale l = nonNull(locale);
String s = getString(l, "siteIndex.removedBadgeWithoutLink");
return String.format(l, s,
arg1,
arg2
);
}
String removedProjectUrl(
Object arg1,
Object arg2) {
return removedProjectUrl(null,
arg1,
arg2
);
}
String removedProjectUrl(Locale locale,
Object arg1,
Object arg2) {
Locale l = nonNull(locale);
String s = getString(l, "siteIndex.removedProjectUrl");
return String.format(l, s,
arg1,
arg2
);
}
String skipped() {
return skipped(null);
}
String skipped(Locale locale) {
Locale l = nonNull(locale);
return getString(l, "siteIndex.skipped");
}
String sourceOutsideProject() {
return sourceOutsideProject(null);
}
String sourceOutsideProject(Locale locale) {
Locale l = nonNull(locale);
return getString(l, "siteIndex.sourceOutsideProject");
}
String targetOutsideProject() {
return targetOutsideProject(null);
}
String targetOutsideProject(Locale locale) {
Locale l = nonNull(locale);
return getString(l, "siteIndex.targetOutsideProject");
}
}
}