Java Getter Name Create toGetter(String fieldName)

Here you can find the source of toGetter(String fieldName)

Description

to Getter

License

Open Source License

Declaration

public static String toGetter(String fieldName) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static String toGetter(String fieldName) {
        return (!fieldName.startsWith("is")
                ? "get" + Character.toUpperCase(fieldName.charAt(0)) + fieldName.substring(1)
                : fieldName);// ww w .  j  a v  a2s  . com
    }
}

Related

  1. toGetter(final String field)
  2. toGetter(String name)
  3. toGetterMethodName(String s)
  4. toGetterName(String name)
  5. toGetterName(String name)