public class

DecapitalizeNameMapper

extends Object
implements NameMapper
java.lang.Object
   ↳ org.apache.commons.betwixt.strategy.DecapitalizeNameMapper

Class Overview

A name mapper which converts types to a decapitalized String.

This conversion decapitalizes in the standard java beans way (as per java.beans.Introspector). This means that the first letter only will be decapitalized except for the case where the first and second characters are both upper case. When both are upper case, then the name will be left alown.

So a bean type of Foo will be converted to the element name "foo"FooBar will be converted to "fooBar". But URL will remain as "URL".

Summary

Public Constructors
DecapitalizeNameMapper()
Public Methods
String mapTypeToElementName(String typeName)
Decapitalize first letter unless both are upper case.
String toString()
Outputs a brief description.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.apache.commons.betwixt.strategy.NameMapper

Public Constructors

public DecapitalizeNameMapper ()

Public Methods

public String mapTypeToElementName (String typeName)

Decapitalize first letter unless both are upper case. (As per standard java beans behaviour.)

Parameters
typeName the string to convert
Returns
  • decapitalized name as per java.beans.Introspector

public String toString ()

Outputs a brief description.