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.opengamma.strata.product.swaption.CashSwaptionSettlementMethod.java

/**
 * Obtains the type from a unique name./*from  www . j  ava  2  s  . c  om*/
 * 
 * @param uniqueName  the unique name
 * @return the type
 * @throws IllegalArgumentException if the name is not known
 */
@FromString
public static CashSwaptionSettlementMethod of(String uniqueName) {
    ArgChecker.notNull(uniqueName, "uniqueName");
    return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, uniqueName));
}

From source file:com.google.api.tools.framework.importers.swagger.NameConverter.java

static String propertyNameToMessageName(String propertyName) {
    return CaseFormat.LOWER_CAMEL.to(CaseFormat.UPPER_CAMEL, sanitizeStringValue(propertyName)) + "Type";
}

From source file:com.opengamma.strata.pricer.common.PriceType.java

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

From source file:springfox.documentation.spring.data.rest.RequestExtractionUtils.java

public static String lowerCamelCaseName(String stringValue) {
    return CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_CAMEL, stringValue);
}

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

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

From source file:com.google.api.tools.framework.importers.swagger.aspects.utils.NameConverter.java

public static String propertyNameToMessageName(String propertyName) {
    return CaseFormat.LOWER_CAMEL.to(CaseFormat.UPPER_CAMEL, sanitizeStringValue(propertyName)) + "Type";
}

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

public static ComparisonOperator fromValue(String value) {
    try {/*  w w  w  .  j  a v a  2 s .com*/
        return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, checkNotNull(value, "value")));

    } catch (IllegalArgumentException e) {
        return UNRECOGNIZED;
    }
}

From source file:org.jclouds.fujitsu.fgcp.domain.VServerStatus.java

public static VServerStatus fromValue(String status) {
    try {//w ww .j  a v a 2 s  . co m
        return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, checkNotNull(status, "status")));
    } catch (IllegalArgumentException e) {
        return UNRECOGNIZED;
    }
}

From source file:org.jclouds.fujitsu.fgcp.domain.PublicIPStatus.java

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

From source file:com.opengamma.integration.tool.portfolio.xml.v1_0.jaxb.OptionTypeAdapter.java

@Override
public String marshal(OptionType v) throws Exception {
    return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, v.name());
}