org.exparity.beans.naming.CapitalizedNamingStrategy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of exparity-bean Show documentation
Show all versions of exparity-bean Show documentation
A Java library of bean utilities for manipulating and inspecting Java classes implementing the Java Beans standard
/*
* Copyright (c) Modular IT Limited.
*/
package org.exparity.beans.naming;
import java.lang.reflect.Method;
import org.exparity.beans.BeanNamingStrategy;
/**
* @author Stewart Bissett
*/
public class CapitalizedNamingStrategy extends AbstractNamingStrategy implements BeanNamingStrategy {
public String describeRoot(final Class> type) {
return describeType(type);
}
public String describeType(final Class> type) {
return typeName(type);
}
public String describeProperty(final Method method, final String prefix) {
return method.getName().substring(prefix.length());
}
}