public static boolean isValidAccessorName ( String accessorName ) { if ( accessorName . startsWith ( "get" ) || accessorName . startsWith ( "is" ) || accessorName . startsWith ( "set" ) ) { int prefixLength = accessorName . startsWith ( "is" ) ? 2 : 3 ; return accessorName . length ( ) > prefixLength ; } ; return false ; }
Detect whether the given accessor name starts with get set or is followed by at least one character .