Class ReflectionFieldAccessor

java.lang.Object
com.google.ads.googleads.lib.reflect.ReflectionFieldAccessor
All Implemented Interfaces:
FieldAccessor
Direct Known Subclasses:
SearchResponseScrubber

public class ReflectionFieldAccessor extends Object implements FieldAccessor
Sets values on a protobuf object based on a string representation of the path to the value.
  • Constructor Details

    • ReflectionFieldAccessor

      public ReflectionFieldAccessor(String path)
  • Method Details

    • setFieldIfPresent

      public com.google.protobuf.Message setFieldIfPresent(com.google.protobuf.Message input, String toSet)
      Specified by:
      setFieldIfPresent in interface FieldAccessor
    • getValues

      public <T> List<T> getValues(com.google.protobuf.Message input)
      Specified by:
      getValues in interface FieldAccessor