List of usage examples for com.google.common.base CaseFormat UPPER_UNDERSCORE
CaseFormat UPPER_UNDERSCORE
To view the source code for com.google.common.base CaseFormat UPPER_UNDERSCORE.
Click Source Link
From source file:com.opengamma.strata.measure.fxopt.FxVanillaOptionMethod.java
/** * Obtains an instance from the specified unique name. * //from w w w .j a va2 s .c o m * @param uniqueName the unique name * @return the type * @throws IllegalArgumentException if the name is not known */ @FromString public static FxVanillaOptionMethod of(String uniqueName) { ArgChecker.notNull(uniqueName, "uniqueName"); return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, uniqueName)); }
From source file:com.opengamma.strata.market.ShiftType.java
/** * Obtains an instance from the specified unique name. * //w ww . j a va 2 s . c o m * @param uniqueName the unique name * @return the type * @throws IllegalArgumentException if the name is not known */ @FromString public static ShiftType of(String uniqueName) { ArgChecker.notNull(uniqueName, "uniqueName"); return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, uniqueName)); }
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 a v a2 s. c om builder.append(piece.namePieceString()); } } return builder.toString(); }
From source file:com.axelor.rpc.filter.Operator.java
private Operator(String value) { this.value = value; this.id = CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, this.name()); }
From source file:org.jclouds.openstack.heat.v1.domain.StackResourceStatus.java
public String value() { return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.LOWER_HYPHEN, name()); }
From source file:com.netflix.spinnaker.clouddriver.lambda.cache.Keys.java
public static Map<String, String> parse(String key) { String[] parts = key.split(SEPARATOR); if (parts.length < 3 || !parts[0].equals(ID)) { return null; }//from ww w. ja v a 2s . c o m Map<String, String> result = new HashMap<>(); result.put("provider", parts[0]); result.put("type", parts[1]); result.put("account", parts[2]); Namespace namespace = Namespace.valueOf(CaseFormat.LOWER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, parts[1])); switch (namespace) { case LAMBDA_FUNCTIONS: result.put("region", parts[3]); result.put("AwsLambdaName", parts[4]); break; case IAM_ROLE: result.put("roleName", parts[3]); break; default: break; } return result; }
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 w w w. ja va 2s. c om return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, propagation.name()); }
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:fr.putnami.pwt.core.widget.client.helper.EnumRenderer.java
public String getEnumKey(E value) { if (value == null) { return null; }//from ww w. ja v a 2 s.c om 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.ow2.proactive.scheduling.api.graphql.common.InputFields.java
public String getName() { return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, name()); }