/** * <p>Uncapitalizes a String changing the first letter to title case as * per {@link Character#toLowerCase(char)}. No other letters are changed.</p> * * @param str the String to uncapitalize, may be null * @return the uncapitalized String, <code>null</code> if null String input * @deprecated Use the standardly named {@link #uncapitalize(String)}. * Method will be removed in Commons Lang 3.0. */ public static String uncapitalise(String str) { return uncapitalize(str); }
public static String generateUrlKey(String toConvert) { if (toConvert != null) { toConvert = toConvert.replaceAll(" ", "-"); if (toConvert.matches(".*?\\W.*?")) { //remove all non-word characters String result = toConvert.replaceAll("[^\\w-]+", ""); //uncapitalizes the first letter of the url key return StringUtils.uncapitalize(result); } else { return StringUtils.uncapitalize(toConvert); } } return toConvert; }
@Nonnull static String normalize(@Nonnull String name) { if (name.toUpperCase().equals(name)) { name = name.toLowerCase(); } else { name = StringUtils.uncapitalize(name); } return name; }
String fieldName = methodName.substring(3); String value = properties.get(StringUtils.uncapitalize(fieldName)); if (value != null) {
final String name = StringUtils.uncapitalize(s); if (exclusions.contains(name)) continue;
private Field getFieldFromMethod(Object o, Method method) { DebugUtils.Assert(method.getName().startsWith("get"), String.format("only getter can be called on KeyValueEntityProxy, but %s is called", method.getName())); String fieldName = StringDSL.stripStart(method.getName(), "get"); fieldName = StringUtils.uncapitalize(fieldName); Field f = FieldUtils.getField(fieldName, o.getClass()); DebugUtils.Assert(f != null, String.format("cannot find field[%s] on class[%s], %s is a wrong getter", fieldName, o.getClass().getName(), method.getName())); return f; }
actionName = StringUtils.removeStart(apiClass.getSimpleName(), "API"); actionName = StringUtils.removeEnd(actionName, "Msg"); actionName = StringUtils.uncapitalize(actionName);
interceporName = StringUtils.removeEnd(StringUtils.uncapitalize(userClass .getSimpleName()), RoseConstants.INTERCEPTOR_SUFFIX); } else {
/** * <p>Uncapitalizes a String changing the first letter to title case as * per {@link Character#toLowerCase(char)}. No other letters are changed.</p> * * @param str the String to uncapitalize, may be null * @return the uncapitalized String, <code>null</code> if null String input * @deprecated Use the standardly named {@link #uncapitalize(String)}. * Method will be removed in Commons Lang 3.0. */ public static String uncapitalise(String str) { return uncapitalize(str); }
/** * @see org.bitbucket.fermenter.mda.metadata.Reference#getName() */ @Override public String getName() { if( name == null ) { name = StringUtils.uncapitalize( type ); } return name; }
/** * <p>Uncapitalizes a String changing the first letter to title case as * per {@link Character#toLowerCase(char)}. No other letters are changed.</p> * * @param str the String to uncapitalize, may be null * @return the uncapitalized String, <code>null</code> if null String input * @deprecated Use the standardly named {@link #uncapitalize(String)}. * Method will be removed in Commons Lang 3.0. */ public static String uncapitalise(String str) { return uncapitalize(str); }
/** * <p>Uncapitalizes a String changing the first letter to title case as * per {@link Character#toLowerCase(char)}. No other letters are changed.</p> * * @param str the String to uncapitalize, may be null * @return the uncapitalized String, <code>null</code> if null String input * @deprecated Use the standardly named {@link #uncapitalize(String)}. * Method will be removed in Commons Lang 3.0. */ public static String uncapitalise(String str) { return uncapitalize(str); }
/** * Strips the "on" prefix from an event type, if one is present. * * @param eventType The event type. * @return The event type stripped of the "on" prefix. */ public static String stripOn(String eventType) { return eventType.startsWith("on") ? StringUtils.uncapitalize(eventType.substring(2)) : eventType; }
/** * * @param beanType * @param <T> * @return the Bean */ private <T> T getBean(Class<T> beanType) { return (T) applicationContext.getBean(StringUtils.uncapitalize(beanType.getSimpleName())); }
/** * Strips the "on" prefix from an event type, if one is present. * * @param eventType The event type. * @return The event type stripped of the "on" prefix. */ public static String stripOn(String eventType) { return eventType.startsWith("on") ? StringUtils.uncapitalize(eventType.substring(2)) : eventType; }
@Nonnull static String normalize(@Nonnull String name) { if (name.toUpperCase().equals(name)) { name = name.toLowerCase(); } else { name = StringUtils.uncapitalize(name); } return name; }
/** * Returns the URL of the default template to use in createFromTemplate. Override this method to * provide an alternate default URL. * * @return The template URL. */ protected String getTemplateUrl() { return "web/" + getClass().getPackage().getName().replace(".", "/") + "/" + StringUtils.uncapitalize(getClass().getSimpleName()) + ".fsp"; }
/** * Returns the name of the query as an uncapitalized string. * @return uncapitalized name */ public String getLowercaseName() { return StringUtils.uncapitalize(query.getName()); }
public static String buildVariableName(final String source) { final String name = StringUtils.uncapitalize(buildJavaFriendlyName(source)); return isJavaKeyword(name) ? "$" + name : name; }
public static void initRequest(CController c,CProject project) { //默认添加Project中的所有的Service List<CField> fields=c.getFields(); for(CMold m:project.getMolds()){ CField cf=new CField(StringUtils.uncapitalize(m.getInterfaceClass()),m.getInterfaceClass(), "", ""); fields.add(cf); } }