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

com.codetaco.cli.impl.usage.UsageBuilderLevel2 Maven / Gradle / Ivy

There is a newer version: 6.10.4
Show newest version
package com.codetaco.cli.impl.usage;

import com.codetaco.cli.impl.CmdLineImpl;
import com.codetaco.cli.impl.ICmdLine;
import com.codetaco.cli.impl.type.AbstractCLA;
import com.codetaco.cli.impl.type.ICmdLineArg;

/**
 * 

* UsageBuilderLevel2 class. *

* * @author Chris DeGreef [email protected] * @since 4.3.4 */ public class UsageBuilderLevel2 extends UsageBuilderLevel1 { /** *

* Constructor for UsageBuilderLevel2. *

*/ public UsageBuilderLevel2() { super(); } /** * {@inheritDoc} * *

* usageDetail. *

*/ @Override public void usageDetail( final char commandPrefix, final ICmdLineArg arg, final int _indentLevel) { nameIt(commandPrefix, arg); final String help = ((AbstractCLA) arg).getHelp(); if (help != null && help.trim().length() > 0) { allign(29); append(help); unallign(); newLine(); } } /** * @param commandPrefix * @param icmdLine * @param indentLevel */ @Override void usageHeader( final char commandPrefix, final ICmdLine icmdLine, final int indentLevel) { final CmdLineImpl commandLineParser = (CmdLineImpl) icmdLine; if (commandLineParser.getName() != null) { append(commandLineParser.getName()); newLine(indentLevel); newLine(); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy