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:org.openehr.adl.util.AdlUtils.java
public static Class<? extends CObject> getAmClass(@Nonnull String amTypeName) throws ClassNotFoundException { int genericsTypeIndex = amTypeName.indexOf('<'); String name = genericsTypeIndex == -1 ? amTypeName : amTypeName.substring(0, genericsTypeIndex); String className = CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, name); //noinspection unchecked return (Class<CObject>) Class.forName(AM_PACKAGE_NAME + '.' + className); }
From source file:org.jclouds.elb.domain.Scheme.java
public static Scheme fromValue(String scheme) { try {/* w w w .j a v a2 s . c o m*/ return valueOf(CaseFormat.LOWER_HYPHEN.to(CaseFormat.UPPER_UNDERSCORE, checkNotNull(scheme, "scheme"))); } catch (IllegalArgumentException e) { return UNRECOGNIZED; } }
From source file:org.jclouds.vcloud.domain.network.nat.NatType.java
public static NatType fromValue(String natType) { try {//w ww .j av a2 s . c o m return valueOf( CaseFormat.LOWER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, checkNotNull(natType, "natType"))); } catch (IllegalArgumentException e) { return UNRECOGNIZED; } }
From source file:com.opengamma.strata.product.swap.FxResetFixingRelativeTo.java
/** * Obtains an instance from the specified unique name. * /* w w w .jav a 2 s . c om*/ * @param uniqueName the unique name * @return the type * @throws IllegalArgumentException if the name is not known */ @FromString public static FxResetFixingRelativeTo of(String uniqueName) { ArgChecker.notNull(uniqueName, "uniqueName"); return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, uniqueName)); }
From source file:org.jclouds.cloudstack.domain.GuestIPType.java
public static GuestIPType fromValue(String type) { try {/* w ww . j ava 2 s. c om*/ return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, checkNotNull(type, "type"))); } catch (IllegalArgumentException e) { return UNRECOGNIZED; } }
From source file:com.github.benmanes.caffeine.cache.Feature.java
public static String makeClassName(String enumName) { return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, enumName); }
From source file:com.opengamma.strata.product.swap.PriceIndexCalculationMethod.java
/** * Obtains the type from a unique name.//from w w w . ja v a 2 s . c o m * * @param uniqueName the unique name * @return the type * @throws IllegalArgumentException if the name is not known */ @FromString public static PriceIndexCalculationMethod of(String uniqueName) { ArgChecker.notNull(uniqueName, "uniqueName"); return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, uniqueName)); }
From source file:com.opengamma.strata.pricer.credit.ArbitrageHandling.java
/** * Obtains an instance from the specified unique name. * //from w w w . java2s .com * @param uniqueName the unique name * @return the type * @throws IllegalArgumentException if the name is not known */ @FromString public static ArbitrageHandling of(String uniqueName) { ArgChecker.notNull(uniqueName, "uniqueName"); return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, uniqueName)); }
From source file:com.google.api.codegen.LanguageUtil.java
public static String upperUnderscoreToUpperCamel(String name) { return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, name); }
From source file:org.jclouds.fujitsu.fgcp.domain.BuiltinServerConfiguration.java
public static BuiltinServerConfiguration fromValue(String configuration) { try {//from w ww .j a v a 2 s . c o m return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, checkNotNull(configuration, "configuration"))); } catch (IllegalArgumentException e) { return UNRECOGNIZED; } }