本文整理汇总了Java中org.jvnet.localizer.Localizable类的典型用法代码示例。如果您正苦于以下问题:Java Localizable类的具体用法?Java Localizable怎么用?Java Localizable使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Localizable类属于org.jvnet.localizer包,在下文中一共展示了Localizable类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: verifyNumberOfItems
import org.jvnet.localizer.Localizable; //导入依赖的package包/类
/**
* Verify number of items.
*/
@Test
public void verifyNumberOfItems() {
AnnotationProvider provider = mock(AnnotationProvider.class);
CheckStyleHealthDescriptor healthDescriptor = new CheckStyleHealthDescriptor(NullHealthDescriptor.NULL_HEALTH_DESCRIPTOR);
Localizable description = healthDescriptor.createDescription(provider);
assertEquals(WRONG_DESCRIPTION, Messages.Checkstyle_ResultAction_HealthReportNoItem(), description.toString());
when(provider.getNumberOfAnnotations()).thenReturn(1);
description = healthDescriptor.createDescription(provider);
assertEquals(WRONG_DESCRIPTION, Messages.Checkstyle_ResultAction_HealthReportSingleItem(), description.toString());
when(provider.getNumberOfAnnotations()).thenReturn(2);
description = healthDescriptor.createDescription(provider);
assertEquals(WRONG_DESCRIPTION, Messages.Checkstyle_ResultAction_HealthReportMultipleItem(2), description.toString());
}
示例2: createDescription
import org.jvnet.localizer.Localizable; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
protected Localizable createDescription(final AnnotationProvider result) {
if (result.getNumberOfAnnotations() == 0) {
return Messages._Bandit_ResultAction_HealthReportNoItem();
}
else if (result.getNumberOfAnnotations() == 1) {
return Messages._Bandit_ResultAction_HealthReportSingleItem();
}
else {
return Messages._Bandit_ResultAction_HealthReportMultipleItem(result.getNumberOfAnnotations());
}
}
示例3: createDescription
import org.jvnet.localizer.Localizable; //导入依赖的package包/类
@Override
protected Localizable createDescription(final AnnotationProvider result) {
if (result.getNumberOfAnnotations() == 0) {
return Messages._ResultAction_HealthReportNoItem();
} else if (result.getNumberOfAnnotations() == 1) {
return Messages._ResultAction_HealthReportSingleItem();
} else {
return Messages._ResultAction_HealthReportMultipleItem(result.getNumberOfAnnotations());
}
}
示例4: getActionTitle
import org.jvnet.localizer.Localizable; //导入依赖的package包/类
public Localizable getActionTitle() {
SupportPlugin supportPlugin = SupportPlugin.getInstance();
if (supportPlugin != null) {
SupportProvider supportProvider = supportPlugin.getSupportProvider();
if (supportProvider != null) {
return supportProvider.getActionTitle();
}
}
return Messages._SupportAction_DefaultActionTitle();
}
示例5: getActionBlurb
import org.jvnet.localizer.Localizable; //导入依赖的package包/类
public Localizable getActionBlurb() {
SupportPlugin supportPlugin = SupportPlugin.getInstance();
if (supportPlugin != null) {
SupportProvider supportProvider = supportPlugin.getSupportProvider();
if (supportProvider != null) {
return supportProvider.getActionBlurb();
}
}
return Messages._SupportAction_DefaultActionBlurb();
}
示例6: createDescription
import org.jvnet.localizer.Localizable; //导入依赖的package包/类
@Override
protected Localizable createDescription(final AnnotationProvider result) {
if (result.getNumberOfAnnotations() == 0) {
return Messages._Checkstyle_ResultAction_HealthReportNoItem();
}
else if (result.getNumberOfAnnotations() == 1) {
return Messages._Checkstyle_ResultAction_HealthReportSingleItem();
}
else {
return Messages._Checkstyle_ResultAction_HealthReportMultipleItem(result.getNumberOfAnnotations());
}
}
示例7: BranchWithMergeRequestCategory
import org.jvnet.localizer.Localizable; //导入依赖的package包/类
BranchWithMergeRequestCategory(@CheckForNull Localizable pronoun) {
super("branchesWithMergeRequests", pronoun);
}
示例8: UpstreamFilterStrategy
import org.jvnet.localizer.Localizable; //导入依赖的package包/类
UpstreamFilterStrategy(boolean forGlobalSetting, Localizable displayName) {
this.forGlobalSetting = forGlobalSetting;
this.displayName = displayName;
}
示例9: BuildStatus
import org.jvnet.localizer.Localizable; //导入依赖的package包/类
BuildStatus(Localizable displayName) {
this.displayName = displayName;
}
示例10: getBigImagePath
import org.jvnet.localizer.Localizable; //导入依赖的package包/类
public static String getBigImagePath(int score) {
HealthReport healthReport = new HealthReport(score, (Localizable)null);
return healthReport.getIconUrl("32x32");
}
示例11: getSmallImagePath
import org.jvnet.localizer.Localizable; //导入依赖的package包/类
public static String getSmallImagePath(int score) {
HealthReport healthReport = new HealthReport(score, (Localizable)null);
return healthReport.getIconUrl("16x16");
}
示例12: Status
import org.jvnet.localizer.Localizable; //导入依赖的package包/类
Status(String cssClass, Localizable message, boolean OK) {
this.cssClass = cssClass;
this.message = message;
isOK = OK;
}
示例13: info
import org.jvnet.localizer.Localizable; //导入依赖的package包/类
public void info(Localizable localizable) {
info(String.valueOf(localizable));
}
示例14: error
import org.jvnet.localizer.Localizable; //导入依赖的package包/类
public void error(Localizable localizable) {
error(String.valueOf(localizable));
}
示例15: _VersionOne_Notifier
import org.jvnet.localizer.Localizable; //导入依赖的package包/类
public static Localizable _VersionOne_Notifier() {
return new Localizable(holder, "VersionOne.Notifier");
}