Example usage for java.beans Introspector decapitalize

List of usage examples for java.beans Introspector decapitalize

Introduction

In this page you can find the example usage for java.beans Introspector decapitalize.

Prototype

public static String decapitalize(String name) 

Source Link

Document

Utility method to take a string and convert it to normal Java variable name capitalization.

Usage

From source file:me.yanaga.winter.data.jpa.spring.config.RepositoriesRegistrar.java

private String defineRepositoryBeanName(String repositoryInterface) {
    String shortClassName = ClassUtils.getShortName(repositoryInterface);
    return Introspector.decapitalize(shortClassName);
}

From source file:com.chiralbehaviors.CoRE.phantasm.graphql.schemas.JooqSchema.java

private static String camel(String snake) {
    return Introspector.decapitalize(converter.convert(snake));
}

From source file:jp.primecloud.auto.ui.mock.MockBeanContext.java

protected <T> Map<String, T> getBeansOfType(Class<T> clazz) {
    Map<String, T> beans = new HashMap<String, T>();
    String id = Introspector.decapitalize(clazz.getSimpleName());
    beans.put(id, clazz.cast(getBean(id)));
    return beans;
}

From source file:io.fabric8.cxf.endpoint.IgnorePropertiesBackedByTransientFields.java

protected String getIsGetterFieldName(String methodName) {
    return Introspector.decapitalize(methodName.substring(2));
}

From source file:io.fabric8.cxf.endpoint.IgnorePropertiesBackedByTransientFields.java

protected String getGetterFieldName(String methodName) {
    return Introspector.decapitalize(methodName.substring(3));
}

From source file:org.cleverbus.core.common.route.RouteBeanNameGenerator.java

protected String buildRouteBeanName(BeanDefinition definition) {
    String shortClassName = ClassUtils.getShortName(definition.getBeanClassName());
    String beanName = Introspector.decapitalize(shortClassName);

    if (StringUtils.contains(definition.getBeanClassName(), MODULES_PACKAGE_IN)) {
        beanName += MODULES_IN;/*w  ww. j a v  a  2 s  . c  o  m*/
    } else if (StringUtils.contains(definition.getBeanClassName(), MODULES_PACKAGE_OUT)) {
        beanName += MODULES_OUT;
    }

    beanName += BEAN_SUFFIX;

    return beanName;
}

From source file:com.cloudera.csd.validation.references.components.ReflectionHelper.java

/**
 * Returns the name of the property associated with the getter method.
 * If the method is not a a getter, an IllegalStateException is thrown.
 *
 * @param method the method./*  w  ww.  j av  a2  s. com*/
 * @return the property name.
 */
public static String propertyNameOfGetter(Method method) {
    Preconditions.checkNotNull(method);
    String name = method.getName();
    for (String prefix : GETTER_PREFIXES) {
        if (name.startsWith(prefix)) {
            return Introspector.decapitalize(name.substring(prefix.length()));
        }
    }
    throw new IllegalStateException("Method is malformed " + method.getName());
}

From source file:com.github.bjoern2.yolotyrion.spring.xml.RepositorySingleBeanDefinitionParser.java

protected String buildDefaultBeanName(BeanDefinition definition) {
    //      BeanDefinitionReaderUtils.generateBeanName(beanDefinition, registry)
    String shortClassName = ClassUtils.getShortName(definition.getBeanClassName());
    return Introspector.decapitalize(shortClassName);
}

From source file:com.homeadvisor.kafdrop.config.ServiceDiscoveryConfiguration.java

private String healthCheckBeanName() {
    String shortClassName = ClassUtils.getShortName(HealthCheckConfiguration.HealthCheck.class);
    return Introspector.decapitalize(shortClassName);
}

From source file:org.traccar.web.CsvBuilder.java

public void addHeaderLine(Object object) {

    SortedSet<Method> methods = getSortedMethods(object);

    for (Method method : methods) {
        if (method.getName().startsWith("get") && method.getParameterTypes().length == 0) {
            String name = Introspector.decapitalize(method.getName().substring(3));
            if (!name.equals("class")) {
                builder.append(name);//from   www . jav  a2 s .  co  m
                addSeparator();
            }
        }
    }
    addLineEnding();
}