@Test public void testGetUsageDescription() { final String usage = sf.getUsageDescription(); assertTrue("The usage description was either null or the empty string.", usage != null && !usage.isEmpty()); }
public final String getUsageDescription() { final StringBuilder usage = new StringBuilder("Call with "); usage.append(getName()); usage.append('('); int optArgCount = 0; boolean isFirst = true; for (final ArgDescriptor argDescriptor : argDescriptors) { if (argDescriptor.isOptional()) { usage.append(isFirst ? "[" : " [,"); ++optArgCount; } else usage.append(isFirst ? "" : " ,"); usage.append(argDescriptor.getArgName()); isFirst = false; } for (int i = 0; i < optArgCount; ++i) usage.append(']'); usage.append(")."); return usage.toString(); }
AbstractFunction implements Function { public final String getUsageDescription() { final StringBuilder usage = new StringBuilder("Call with "); usage.append(getName()); usage.append('('); int optArgCount = 0; boolean isFirst = true; for (final ArgDescriptor argDescriptor : argDescriptors) { if (argDescriptor.isOptional()) { usage.append(isFirst ? "[" : " [,"); ++optArgCount; } else usage.append(isFirst ? "" : " ,"); usage.append(argDescriptor.getArgName()); isFirst = false; } for (int i = 0; i < optArgCount; ++i) usage.append(']'); usage.append(")."); return usage.toString(); } }
AbstractFunction implements Function { public final String getUsageDescription() { final StringBuilder usage = new StringBuilder("Call with "); usage.append(getName()); usage.append('('); int optArgCount = 0; boolean isFirst = true; for (final ArgDescriptor argDescriptor : argDescriptors) { if (argDescriptor.isOptional()) { usage.append(isFirst ? "[" : " [,"); ++optArgCount; } else usage.append(isFirst ? "" : " ,"); usage.append(argDescriptor.getArgName()); isFirst = false; } for (int i = 0; i < optArgCount; ++i) usage.append(']'); usage.append(")."); return usage.toString(); } protected  AbstractFunction(final ArgDescriptor[] argDescriptors); }
AbstractFunction implements Function { public final String getUsageDescription() { final StringBuilder usage = new StringBuilder("Call with "); usage.append(getName()); usage.append('('); int optArgCount = 0; boolean isFirst = true; for (final ArgDescriptor argDescriptor : argDescriptors) { if (argDescriptor.isOptional()) { usage.append(isFirst ? "[" : " [,"); ++optArgCount; } else usage.append(isFirst ? "" : " ,"); usage.append(argDescriptor.getArgName()); isFirst = false; } for (int i = 0; i < optArgCount; ++i) usage.append(']'); usage.append(")."); return usage.toString(); } protected  AbstractFunction(final ArgDescriptor[] argDescriptors); abstract String getName(); abstract String getFunctionSummary(); final String getUsageDescription(); abstract Class getReturnType(); Class validateArgTypes(final Class[] argTypes); abstract Object evaluateFunction(final Object[] args); final List<Class<?>> getPossibleArgTypes(final Class[] leadingArgs); }
AbstractFunction implements Function { public final String getUsageDescription() { final StringBuilder usage = new StringBuilder("Call with "); usage.append(getName()); usage.append('('); int optArgCount = 0; boolean isFirst = true; for (final ArgDescriptor argDescriptor : argDescriptors) { if (argDescriptor.isOptional()) { usage.append(isFirst ? "[" : " [,"); ++optArgCount; } else usage.append(isFirst ? "" : " ,"); usage.append(argDescriptor.getArgName()); isFirst = false; } for (int i = 0; i < optArgCount; ++i) usage.append(']'); usage.append(")."); return usage.toString(); } protected  AbstractFunction(final ArgDescriptor[] argDescriptors); abstract String getName(); abstract String getFunctionSummary(); final String getUsageDescription(); abstract Class getReturnType(); Class validateArgTypes(final Class[] argTypes); abstract Object evaluateFunction(final Object[] args); final List<Class<?>> getPossibleArgTypes(final Class[] leadingArgs);  }