private static Object setValueForSetter(Object proxy, Method m, Callable<?> callable, PlcConnectionManager connectionManager,
                                            String address, AliasRegistry registry, Map<String, Instant> lastFetched, Object object) throws OPMException {
        String s = m.getName().substring(3);
        // First char to lower
        String variable = s.substring(0, 1).toLowerCase().concat(s.substring(1));
        LOGGER.trace("Looking for tag with name {} after invokation of getter {}", variable, m.getName());
        PlcTag annotation;
        Field field;
        try {
            field = m.getDeclaringClass().getDeclaredField(variable);
            annotation = field.getDeclaredAnnotation(PlcTag.class);
        } catch (NoSuchFieldException e) {
            throw new OPMException("Unable to identify tag with name '" + variable + "' for call to '" + m.getName() + "'", e);
        }

        // Use Fully qualified Name as tag index
        String fqn = getFqn(field);

        try (PlcConnection connection = connectionManager.getConnection(address)) {
            // Catch the exception, if no reader present (see below)

            PlcWriteRequest.Builder builder = connection.writeRequestBuilder();
            if (object instanceof Collection) {
                builder.addTagAddress(fqn, OpmUtils.getOrResolveAddress(registry, annotation.value()), ((Collection<?>) object).toArray());
            } else {
                builder.addTagAddress(fqn, OpmUtils.getOrResolveAddress(registry, annotation.value()), object);
            }
            PlcWriteRequest request = builder.build();

            PlcWriteResponse response = getPlcWriteResponse(request);

            // Fill into Cache
            lastFetched.put(field.getName(), Instant.now());

            LOGGER.debug("getTyped clazz: {}, response: {}, tagName: {}", m.getParameters()[0].getType(), response, fqn);
            if (response.getResponseCode(fqn) != PlcResponseCode.OK) {
                throw new PlcRuntimeException(String.format("Unable to read specified tag '%s', response code was '%s'",
                    fqn, response.getResponseCode(fqn)));
            }
            callable.call();
            return null;
        } catch (ClassCastException e) {
            throw new OPMException("Unable to return response as suitable type", e);
        } catch (Exception e) {
            throw new OPMException("Problem during processing", e);
        }
    }
Checks if a tags needs to be re-fetched/re-written, i.e., the cached values are too old.
plc4j/tools/opm/src/main/java/org/apache/plc4x/java/opm/PlcEntityInterceptor.java