Package org.apache.maven.cli.jansi
Class JansiMessageBuilderFactory
java.lang.Object
org.apache.maven.cli.jansi.JansiMessageBuilderFactory
- All Implemented Interfaces:
Service,MessageBuilderFactory
@Experimental
@Named
@Singleton
public class JansiMessageBuilderFactory
extends Object
implements MessageBuilderFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a new message builder.builder(StringBuilder stringBuilder) Creates a new message builder backed by the given string builder.intReturns the terminal width or-1if not supported.booleanChecks if the underlying output does support styling or not.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.maven.api.services.MessageBuilderFactory
builder
-
Constructor Details
-
JansiMessageBuilderFactory
public JansiMessageBuilderFactory()
-
-
Method Details
-
isColorEnabled
public boolean isColorEnabled()Description copied from interface:MessageBuilderFactoryChecks if the underlying output does support styling or not.- Specified by:
isColorEnabledin interfaceMessageBuilderFactory- Returns:
- whether color styling is supported or not
-
getTerminalWidth
public int getTerminalWidth()Description copied from interface:MessageBuilderFactoryReturns the terminal width or-1if not supported.- Specified by:
getTerminalWidthin interfaceMessageBuilderFactory- Returns:
- the terminal width
-
builder
Description copied from interface:MessageBuilderFactoryCreates a new message builder.- Specified by:
builderin interfaceMessageBuilderFactory- Returns:
- a new message builder
-
builder
Description copied from interface:MessageBuilderFactoryCreates a new message builder backed by the given string builder.- Specified by:
builderin interfaceMessageBuilderFactory- Parameters:
stringBuilder- a string builder- Returns:
- a new message builder
-