List of usage examples for com.google.common.base CaseFormat UPPER_CAMEL
CaseFormat UPPER_CAMEL
To view the source code for com.google.common.base CaseFormat UPPER_CAMEL.
Click Source Link
From source file:datamine.storage.idl.generator.metadata.MetadataFileGenerator.java
public static String getClassName(String tableName) { return new StringBuilder().append(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, tableName)) .append("Metadata").toString(); }
From source file:com.google.api.codegen.util.CommonAcronyms.java
public static String camelizeUpperAcronyms(String str) { StringBuilder builder = new StringBuilder(); for (SubNamePiece piece : splitByUpperAcronyms(str)) { if (piece.type().equals(NamePieceCasingType.UPPER_ACRONYM)) { builder.append(CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, piece.namePieceString())); } else {//w w w . j ava 2 s . c o m builder.append(piece.namePieceString()); } } return builder.toString(); }
From source file:com.querydsl.core.types.dsl.PathBuilderFactory.java
/** * Create a new PathBuilder instance for the given type * * @param type type of expression// w w w. ja va 2 s . c o m * @return new PathBuilder instance */ @SuppressWarnings("unchecked") public <T> PathBuilder<T> create(Class<T> type) { PathBuilder<T> rv = (PathBuilder<T>) paths.get(type); if (rv == null) { rv = new PathBuilder<T>(type, CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_CAMEL, type.getSimpleName())); paths.put(type, rv); } return rv; }
From source file:fr.putnami.pwt.core.widget.client.helper.EnumRenderer.java
public String getEnumKey(E value) { if (value == null) { return null; }//from w w w. j a v a 2s.co m StringBuilder result = new StringBuilder(); result.append(CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_CAMEL, this.getSimpleClassName(value))); result.append(CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, value.toString())); result.append(EnumRenderer.ENUM_SUFFIX); return result.toString(); }
From source file:org.apache.aries.blueprint.plugin.model.SpringTransactionFactory.java
@Override public String getTransactionTypeName(Transactional transactional) { Propagation propagation = transactional.propagation(); if (propagation == Propagation.NESTED) { throw new UnsupportedOperationException("Nested transactions not supported"); }/*from ww w .ja v a 2 s . c o m*/ return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, propagation.name()); }
From source file:com.github.steveash.spring.WiringFactoryBeanFactoryPostProcessor.java
@Nullable static java.lang.String getPrototypeBeanNameFromBeanClass(Class<?> prototypeBeanClass) { String prototypeBeanName = prototypeBeanClass.getSimpleName(); return CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_CAMEL, prototypeBeanName); }
From source file:com.google.api.codegen.LanguageUtil.java
public static String lowerCamelToUpperCamel(String name) { return CaseFormat.LOWER_CAMEL.to(CaseFormat.UPPER_CAMEL, name); }
From source file:com.opengamma.strata.product.credit.RestructuringClause.java
/** * Obtains the type from a unique name./* w w w . j a v a2 s. c o m*/ * * @param uniqueName the unique name * @return the type * @throws IllegalArgumentException if the name is not known */ @FromString public static RestructuringClause of(String uniqueName) { ArgChecker.notNull(uniqueName, "uniqueName"); String str = CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, uniqueName); return valueOf(str.substring(0, str.length() - 4) + "_" + str.substring(str.length() - 4)); }
From source file:org.apache.aries.blueprint.plugin.model.JavaxTransactionFactory.java
@Override public String getTransactionTypeName(Transactional transactional) { return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, transactional.value().name()); }
From source file:org.dcache.xrootd.protocol.messages.StringResponse.java
@Override public String toString() { String type = CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_HYPHEN, getClass().getSimpleName()); return String.format("%s[%s]", type, response); }