use of org.apiguardian.api.API in project junit5 by junit-team.
the class ConsoleLauncher method execute.
@API(status = INTERNAL, since = "1.0")
public static ConsoleLauncherExecutionResult execute(PrintStream out, PrintStream err, String... args) {
CommandLineOptionsParser parser = new JOptSimpleCommandLineOptionsParser();
ConsoleLauncher consoleLauncher = new ConsoleLauncher(parser, out, err);
return consoleLauncher.execute(args);
}
use of org.apiguardian.api.API in project junit5 by junit-team.
the class TestIdentifier method from.
/**
* Factory for creating a new {@link TestIdentifier} from a {@link TestDescriptor}.
*/
@API(status = INTERNAL, since = "1.0")
public static TestIdentifier from(TestDescriptor testDescriptor) {
Preconditions.notNull(testDescriptor, "TestDescriptor must not be null");
String uniqueId = testDescriptor.getUniqueId().toString();
String displayName = testDescriptor.getDisplayName();
TestSource source = testDescriptor.getSource().orElse(null);
Set<TestTag> tags = testDescriptor.getTags();
Type type = testDescriptor.getType();
String parentId = testDescriptor.getParent().map(parentDescriptor -> parentDescriptor.getUniqueId().toString()).orElse(null);
String legacyReportingName = testDescriptor.getLegacyReportingName();
return new TestIdentifier(uniqueId, displayName, source, tags, type, parentId, legacyReportingName);
}
use of org.apiguardian.api.API in project jmeter by apache.
the class AbstractJMeterGuiComponent method wrapTitlePanel.
@API(status = EXPERIMENTAL, since = "5.2.0")
protected Container wrapTitlePanel(Container titlePanel) {
VerticalPanel vp = new VerticalPanel();
vp.add(titlePanel);
return vp;
}
use of org.apiguardian.api.API in project jmeter by apache.
the class LogLevelCommand method getRootLevel.
@API(since = "5.3", status = API.Status.INTERNAL)
public static Level getRootLevel() {
final LoggerContext loggerContext = LoggerContext.getContext(false);
final LoggerConfig loggerConfig = loggerContext.getConfiguration().getRootLogger();
return loggerConfig.getLevel();
}
use of org.apiguardian.api.API in project jmeter by apache.
the class DynamicStyle method onLaFChange.
/**
* Schedules an action to be executed after each Look and Feel change.
* @param action action to execute
* @return a handle that can be used to un-register the listener
*/
@API(since = "5.3", status = API.Status.EXPERIMENTAL)
public static Closeable onLaFChange(Runnable action) {
// Explicit component update is required since the component already exists
// and we can't want to wait for the next LaF change
action.run();
PropertyChangeListener listener = evt -> {
if ("lookAndFeel".equals(evt.getPropertyName())) {
// $NON-NLS-1$
action.run();
}
};
UIManager.addPropertyChangeListener(listener);
return () -> UIManager.removePropertyChangeListener(listener);
}
Aggregations