All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.exparity.beans.naming.LowerCaseNamingStrategy Maven / Gradle / Ivy

/*
 * Copyright (c) Modular IT Limited.
 */

package org.exparity.beans.naming;

import java.lang.reflect.Method;

import org.exparity.beans.BeanNamingStrategy;

import static org.apache.commons.lang.StringUtils.lowerCase;

/**
 * @author Stewart Bissett
 */
public class LowerCaseNamingStrategy extends AbstractNamingStrategy implements BeanNamingStrategy {

	public String describeRoot(final Class type) {
		return describeType(type);
	}

	public String describeType(final Class type) {
		return lowerCase(typeName(type));
	}

	public String describeProperty(final Method method, final String prefix) {
		return lowerCase(method.getName().substring(prefix.length()));
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy