本文整理汇总了Java中com.sun.tools.doclets.standard.Standard.optionLength方法的典型用法代码示例。如果您正苦于以下问题:Java Standard.optionLength方法的具体用法?Java Standard.optionLength怎么用?Java Standard.optionLength使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.tools.doclets.standard.Standard
的用法示例。
在下文中一共展示了Standard.optionLength方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: optionLength
import com.sun.tools.doclets.standard.Standard; //导入方法依赖的package包/类
public static int optionLength(String option) {
Integer length = StabilityOptions.optionLength(option);
if (length != null) {
return length;
}
return Standard.optionLength(option);
}
示例2: optionLength
import com.sun.tools.doclets.standard.Standard; //导入方法依赖的package包/类
/**
* Get the number of arguments that a given option expects from the command line. This number includes the option
* itself: for example '-d /output/javadoc' should return 2.
*
* @param optionFlag the option to parse
* @return the number of arguments it expects from the command line
*/
public static int optionLength(String optionFlag) {
for (OrchidFlag option : OrchidFlags.getInstance().getFlags()) {
if (optionFlag.equals("-" + option.getFlag())) {
return option.optionLength();
}
}
return Standard.optionLength(optionFlag);
}
示例3: optionLength
import com.sun.tools.doclets.standard.Standard; //导入方法依赖的package包/类
/**
* Option check, forwards options to the standard doclet,
* if that one refuses them, they are used by this doclet.
*/
public static int optionLength(String option) {
// Workaround http://stackoverflow.com/questions/19181236 courtesy
// UmlGraphDoc.
int result = Standard.optionLength(option);
if (result != 0) {
return result;
} else {
// Ones we want.
if (OPTION_NAMES.containsKey(option)) { return 2; }
return 0;
}
}
示例4: optionLength
import com.sun.tools.doclets.standard.Standard; //导入方法依赖的package包/类
public static int optionLength(String option) {
if (OPTION_CATEGORY.equals(option)) {
return 2;
}
if (OPTION_SOURCE_CLASS_PATH.equals(option)) {
return 2;
}
if (OPTION_NO_PACKAGE_DIAGRAM.equals(option)) {
return 1;
}
int answer = Standard.optionLength(option);
if (option.equals(OPTION_HELP)) {
// Print the options provided by APIviz.
System.out.println();
System.out.println("Provided by APIviz doclet:");
System.out.println(OPTION_SOURCE_CLASS_PATH + " <pathlist> Specify where to find source class files");
System.out.println(OPTION_NO_PACKAGE_DIAGRAM + " Do not generate the package diagram in the overview summary");
System.out.println(OPTION_CATEGORY + " <category>[:<fillcolor>[:<linecolor>]] ");
System.out.println(" Color for items marked with " + TAG_CATEGORY);
}
return answer;
}
示例5: optionLength
import com.sun.tools.doclets.standard.Standard; //导入方法依赖的package包/类
public static int optionLength(String option) {
if (option.equals("-resource-info")) {
return 2;
} else {
return Standard.optionLength(option);
}
}
示例6: testOptionLength
import com.sun.tools.doclets.standard.Standard; //导入方法依赖的package包/类
@Test
public void testOptionLength() throws Exception {
String options = "options";
int optionsLength = 42;
PowerMockito.when(Standard.class, "optionLength", options).thenReturn(optionsLength);
assertEquals(optionsLength, adapter.optionLength(options));
PowerMockito.verifyStatic();
Standard.optionLength(options);
}
示例7: optionLength
import com.sun.tools.doclets.standard.Standard; //导入方法依赖的package包/类
public int optionLength(String option) {
return Standard.optionLength(option);
}
示例8: optionLength
import com.sun.tools.doclets.standard.Standard; //导入方法依赖的package包/类
public static int optionLength(String option) {
return Standard.optionLength(option);
}
示例9: optionLength
import com.sun.tools.doclets.standard.Standard; //导入方法依赖的package包/类
public static int optionLength(String option)
{
return Standard.optionLength(option);
}
示例10: optionLength
import com.sun.tools.doclets.standard.Standard; //导入方法依赖的package包/类
public static int optionLength (String option) {
return Standard.optionLength(option);
}
示例11: optionLength
import com.sun.tools.doclets.standard.Standard; //导入方法依赖的package包/类
public static int optionLength(String option) {
return Standard.optionLength(option);
}