private boolean hasGetter(Class<T> c, String s) {
        List<String> candidates = Arrays.asList("get" + s, "is" + s);
        for (Method m : c.getMethods()) {
            if (m.getParameterCount() == 0 && candidates.contains(m.getName())) {
                return true;
            }
        }
        return false;
    }
Check if target class has a Getter method for property s
plugin/src/main/java/io/jenkins/plugins/casc/BaseConfigurator.java