public boolean requiresPointerAccess(ComplexTypeDefinition typeDefinition, String propertyName) {
        final Optional<NamedField> namedFieldOptional = typeDefinition.getFields().stream()
            .filter(NamedField.class::isInstance)
            .map(NamedField.class::cast)
            .filter(namedField -> namedField.getName().equals(propertyName))
            .findFirst();
        // If the property name refers to a field, check if it's an optional field.
        // If it is, pointer access is required, if not, it's not.
        if (namedFieldOptional.isPresent()) {
            return namedFieldOptional
                .filter(TypedField.class::isInstance)
                .map(TypedField.class::cast)
                .map(typedField -> !(typedField.isEnumField()) && typedField.getType().isComplexTypeReference())
                .orElse(false);
        }
        return typeDefinition.getParserArguments()
            .orElse(Collections.emptyList())
            .stream()
            .filter(argument -> argument.getName().equals(propertyName)).findFirst()
            // If the property name refers to a parser argument, as soon as it's a complex type,
            // pointer access is required.
            .map(Argument::getType)
            .filter(ComplexTypeReference.class::isInstance)
            .isPresent();
        // In all other cases, the property might be a built-in constant, so we don't need pointer
        // access for any of these.
    }
If a property references a complex type in an argument, we need to pass that as a pointer,
same with optional fields.

@param typeDefinition type that contains the property or attribute.
@param propertyName   name of the property or attribute
@return true if the access needs to be using pointers
code-generation/language-c/src/main/java/org/apache/plc4x/language/c/CLanguageTemplateHelper.java