/*
 * Copyright 2011 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.modelmapper.convention;

import java.beans.Introspector;

import org.modelmapper.spi.NameTransformer;
import org.modelmapper.spi.NameableType;

/**
 * {@link NameTransformer} implementations.
 * 
 * @author Jonathan Halterman
 */
public class NameTransformers {
  /**
   * Transforms accessor names to their simple property name according to the JavaBeans convention.
   * Class and field names are unchanged.
   */
  public static final NameTransformer JAVABEANS_ACCESSOR = new NameTransformer() {
    public String transform(String name, NameableType nameableType) {
      if (NameableType.METHOD.equals(nameableType)) {
        if (name.startsWith("get"))
          return Introspector.decapitalize(name.substring(3));
        else if (name.startsWith("is"))
          return Introspector.decapitalize(name.substring(2));
      }

      return name;
    }

    @Override
    public String toString() {
      return "Javabeans Accessor";
    }
  };

  /**
   * Transforms mutator names to their simple property name according to the JavaBeans convention.
   * Class and field names are unchanged.
   */
  public static final NameTransformer JAVABEANS_MUTATOR = new NameTransformer() {
    public String transform(String name, NameableType nameableType) {
      if (NameableType.METHOD.equals(nameableType) && name.startsWith("set"))
        return Introspector.decapitalize(name.substring(3));
      return name;
    }

    @Override
    public String toString() {
      return "Javabeans Mutator";
    }
  };
}

@@ -667,43 +667,8 @@
 %0D%0A%0D%0A
-import java.beans.Introspector;%0D%0A%0D%0A
 impo
@@ -876,16 +876,1015 @@
 mers %7B%0D%0A
+%09%0D%0A%09/**%0D%0A%09 * Utility method to take a string and convert it to normal Java variable%0D%0A%09 * name capitalization.  This normally means converting the first%0D%0A%09 * character from upper case to lower case, but in the (unusual) special%0D%0A%09 * case when there is more than one character and both the first and%0D%0A%09 * second characters are upper case, we leave it alone.%0D%0A%09 * %3Cp%3E%0D%0A%09 * Thus %22FooBah%22 becomes %22fooBah%22 and %22X%22 becomes %22x%22, but %22URL%22 stays%0D%0A%09 * as %22URL%22.%0D%0A%09 *%0D%0A%09 * @param  name The string to be decapitalized.%0D%0A%09 * @return  The decapitalized version of the string.%0D%0A%09 */%0D%0A%09private static String decapitalize(String name) %7B%0D%0A%09    if (name == null %7C%7C name.length() == 0) %7B%0D%0A%09        return name;%0D%0A%09    %7D%0D%0A%09    if (name.length() %3E 1 && Character.isUpperCase(name.charAt(1)) &&%0D%0A%09                    Character.isUpperCase(name.charAt(0)))%7B%0D%0A%09        return name;%0D%0A%09    %7D%0D%0A%09    char chars%5B%5D = name.toCharArray();%0D%0A%09    chars%5B0%5D = Character.toLowerCase(chars%5B0%5D);%0D%0A%09    return new String(chars);%0D%0A%09%7D%0D%0A    %0D%0A
   /**%0D%0A 
@@ -2293,36 +2293,40 @@
      return 
-Introspector
+NameTransformers
 .decapitaliz
@@ -2402,36 +2402,40 @@
      return 
-Introspector
+NameTransformers
 .decapitaliz
@@ -3004,20 +3004,24 @@
 urn 
-Introspector
+NameTransformers
 .dec

Remove the java.beans.Introspector import