private String getGetterName(JClassType type, JField field) {
        String methodBaseName = getMiddleNameForPrefixingAsAccessorMutator(field.getName());
        String fieldName;
        JType booleanType = null;
        try {
            booleanType = find(Boolean.class, getLogger(), context);
        } catch (UnableToCompleteException e) {
            // do nothing
        }
        if (field.getType().equals(JPrimitiveType.BOOLEAN) || field.getType().equals(booleanType)) {
            if (field instanceof DummyJField) {
                return ((DummyJField) field).getGetterMethod().getName();
            }
            fieldName = "is" + methodBaseName;
            if (exists(type, field, fieldName, false)) {
                return fieldName;
            }
            fieldName = "has" + methodBaseName;
            if (exists(type, field, fieldName, false)) {
                return fieldName;
            }
        }
        fieldName = "get" + methodBaseName;
        if (exists(type, field, fieldName, false)) {
            return fieldName;
        }
        return null;
    }
private String getGetterName ( JClassType type , JField field ) { String methodBaseName = getMiddleNameForPrefixingAsAccessorMutator ( field . getName ( ) ) ; String fieldName ; JType booleanType = null ; try { booleanType = find ( Boolean . class , getLogger ( ) , context ) ; } catch ( UnableToCompleteException e ) { } if ( field . getType ( ) . equals ( JPrimitiveType . BOOLEAN ) || field . getType ( ) . equals ( booleanType ) ) { if ( field instanceof DummyJField ) { return ( ( DummyJField ) field ) . getGetterMethod ( ) . getName ( ) ; } fieldName = "is" + methodBaseName ; if ( exists ( type , field , fieldName , false ) ) { return fieldName ; } fieldName = "has" + methodBaseName ; if ( exists ( type , field , fieldName , false ) ) { return fieldName ; } } fieldName = "get" + methodBaseName ; if ( exists ( type , field , fieldName , false ) ) { return fieldName ; } return null ; }
@param field
@return the name for the getter for the specified field or null if a
getter can't be found.