List of usage examples for com.google.common.base CaseFormat LOWER_CAMEL
CaseFormat LOWER_CAMEL
To view the source code for com.google.common.base CaseFormat LOWER_CAMEL.
Click Source Link
From source file:org.springframework.data.cassandra.util.CassandraNamingUtils.java
/** * Converts upper-camel field name to lower-underscore format. * * @param fieldName/* w ww . ja v a 2 s . c o m*/ * @return */ public static String guessColumnName(String fieldName) { return CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, fieldName); }
From source file:org.jclouds.vcloud.domain.network.nat.NatType.java
public static NatType fromValue(String natType) { try {//from w w w . j a v a 2 s .co m return valueOf( CaseFormat.LOWER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, checkNotNull(natType, "natType"))); } catch (IllegalArgumentException e) { return UNRECOGNIZED; } }
From source file:springfox.documentation.spring.data.rest.RequestExtractionUtils.java
public static String upperCamelCaseName(String stringValue) { return CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_CAMEL, stringValue); }
From source file:com.google.api.tools.framework.importers.swagger.aspects.utils.NameConverter.java
public static String schemaNameToMessageName(String schemaName) { return CaseFormat.LOWER_CAMEL.to(CaseFormat.UPPER_CAMEL, sanitizeStringValue(schemaName)); }
From source file:io.soliton.protobuf.json.Messages.java
/** * Converts a proto-message into an equivalent JSON representation. * * @param output/*from w ww. j av a2 s. c o m*/ */ public static JsonObject toJson(Message output) { JsonObject object = new JsonObject(); for (Map.Entry<Descriptors.FieldDescriptor, Object> field : output.getAllFields().entrySet()) { String jsonName = CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, field.getKey().getName()); if (field.getKey().isRepeated()) { JsonArray array = new JsonArray(); List<?> items = (List<?>) field.getValue(); for (Object item : items) { array.add(serializeField(field.getKey(), item)); } object.add(jsonName, array); } else { object.add(jsonName, serializeField(field.getKey(), field.getValue())); } } return object; }
From source file:org.zalando.problem.spring.web.advice.ExceptionHandling.java
@Override public String formatFieldName(String fieldName) { return CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, fieldName); }
From source file:com.google.gerrit.server.project.RepositoryStatistics.java
public RepositoryStatistics(Properties p) { for (Entry<Object, Object> e : p.entrySet()) { put(CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, e.getKey().toString()), e.getValue()); }// w ww . j a va 2 s .c om }
From source file:org.jclouds.vcloud.domain.network.FenceMode.java
public static FenceMode fromValue(String fenceMode) { try {/*from w ww . java2s . c om*/ return valueOf( CaseFormat.LOWER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, checkNotNull(fenceMode, "fenceMode"))); } catch (IllegalArgumentException e) { return UNRECOGNIZED; } }
From source file:org.freedesktop.wayland.generator.impl.StringUtil.java
public static String lowerCamelName(final String lowerUnderScoreName) { return CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, lowerUnderScoreName); }
From source file:com.htmlhifive.pitalium.core.selenium.PtlSelendroidWebElement.java
@Override public String getCssValue(String propertyName) { String name = CaseFormat.LOWER_HYPHEN.to(CaseFormat.LOWER_CAMEL, propertyName); String script = String.format(GET_CSS_VALUE_SCRIPT, name); return getWrappedDriver().executeJavaScript(script, this); }