Example usage for com.google.common.base CaseFormat UPPER_CAMEL

List of usage examples for com.google.common.base CaseFormat UPPER_CAMEL

Introduction

In this page you can find the example usage for com.google.common.base CaseFormat UPPER_CAMEL.

Prototype

CaseFormat UPPER_CAMEL

To view the source code for com.google.common.base CaseFormat UPPER_CAMEL.

Click Source Link

Document

Java and C++ class naming convention, e.g., "UpperCamel".

Usage

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:org.jclouds.fujitsu.fgcp.domain.BuiltinServerConfiguration.java

public static BuiltinServerConfiguration fromValue(String configuration) {
    try {//ww w . ja  v  a2 s.  c  om
        return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE,
                checkNotNull(configuration, "configuration")));
    } 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.PaymentRelativeTo.java

/**
 * Obtains an instance from the specified unique name.
 * /*  w  w w  .ja 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 PaymentRelativeTo of(String uniqueName) {
    ArgChecker.notNull(uniqueName, "uniqueName");
    return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, uniqueName));
}

From source file:org.jclouds.cloudwatch.domain.Unit.java

public static Unit fromValue(String value) {
    try {/*  w w  w  . j  a v a2s  .com*/
        return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE,
                checkNotNull(value, "value").replace("/", "Per")));
    } catch (IllegalArgumentException e) {
        return UNRECOGNIZED;
    }
}

From source file:org.jclouds.cloudstack.domain.TrafficType.java

public static TrafficType fromValue(String type) {
    try {/*from  w ww .j av a  2  s. c o  m*/
        return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, checkNotNull(type, "type")));
    } catch (IllegalArgumentException e) {
        return UNRECOGNIZED;
    }
}

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.freedesktop.wayland.generator.impl.StringUtil.java

public static String upperCamelName(final String lowerUnderScoreName) {
    return CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, lowerUnderScoreName);
}

From source file:com.opengamma.strata.product.swap.FixingRelativeTo.java

/**
 * Obtains an instance from the specified unique name.
 * //from  w  ww.  ja  va2s  .  c o m
 * @param uniqueName  the unique name
 * @return the type
 * @throws IllegalArgumentException if the name is not known
 */
@FromString
public static FixingRelativeTo of(String uniqueName) {
    ArgChecker.notNull(uniqueName, "uniqueName");
    return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, uniqueName));
}

From source file:com.opengamma.strata.product.swap.SwapLegType.java

/**
 * Obtains the type from a unique name./*from   w  w w .ja  va  2 s.  co m*/
 * 
 * @param uniqueName  the unique name
 * @return the type
 * @throws IllegalArgumentException if the name is not known
 */
@FromString
public static SwapLegType of(String uniqueName) {
    ArgChecker.notNull(uniqueName, "uniqueName");
    return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, uniqueName));
}