private Type _getValue(Owner target) throws ConfiguratorException {
        final Class<?> clazz = target.getClass();

        try {
            final Method method = locateGetter(clazz, this.name);
            if (method != null) {
                return (Type) method.invoke(target);
            }

            // If this is a public final field, developers don't define getters as jelly can use them as-is
            final Field field = ExtraFieldUtils.getField(clazz, this.name, true);
            if (field != null) {
                return (Type) field.get(target);
            }

            throw new ConfiguratorException("Can't read attribute '" + name + "' from " + target);
        } catch (IllegalArgumentException | IllegalAccessException | InvocationTargetException e) {
            throw new ConfiguratorException("Can't read attribute '" + name + "' from " + target, e);
        }
    }
This is a method which tries to guess whether an attribute is {@link Secret}.
@param targetClass Class of the target object. {@code null} if unknown
@param fieldName Field name
@return {@code true} if the attribute is secret
        {@code false} if not or if there is no conclusive answer.
plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java