Package org.apache.johnzon.mapper.util
Class BeanUtil
- java.lang.Object
-
- org.apache.johnzon.mapper.util.BeanUtil
-
public final class BeanUtil extends Object
Some simple bean introspection methods. To avoid a dependency on the awt java.beans.introspector which is a desktop level class.
-
-
Constructor Summary
Constructors Modifier Constructor Description privateBeanUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Stringcapitalize(String fieldName)capitalize according to java beans specificationstatic Stringdecapitalize(String name)decapitalize according to java beans specification.static StringgetterName(String fieldName, Class<?> type)Calculate the name of a getter based on the name of it's field and the typestatic StringsetterName(String fieldName)Calculate the name of a setter based on the name of it's field
-
-
-
Method Detail
-
getterName
public static String getterName(String fieldName, Class<?> type)
Calculate the name of a getter based on the name of it's field and the type- Parameters:
fieldName- of the fieldtype- of the field- Returns:
- "get" or "is" method name for the field
-
setterName
public static String setterName(String fieldName)
Calculate the name of a setter based on the name of it's field- Parameters:
fieldName- of the field- Returns:
- "set" method name for the field
-
capitalize
public static String capitalize(String fieldName)
capitalize according to java beans specification
-
-