code: func (f *PropertyFilter) matches(ctx *Context, ref types.ManagedObjectReference, change *types.PropertyChange) bool {
  	var kind reflect.Type
  
  	for _, p := range f.Spec.PropSet {
  		if p.Type != ref.Type {
  			if kind == nil {
  				kind = getManagedObject(ctx.Map.Get(ref)).Type()
  			}
  			// e.g. ManagedEntity, ComputeResource
  			field, ok := kind.FieldByName(p.Type)
  			if !(ok && field.Anonymous) {
  				continue
  			}
  		}
  
  		if isTrue(p.All) {
  			return true
  		}
  
  		for _, name := range p.PathSet {
  			if name == change.Name {
  				return true
  			}
  
  			// strings.HasPrefix("runtime.powerState", "runtime") == parent field matches
  			if strings.HasPrefix(change.Name, name) {
  				if obj := ctx.Map.Get(ref); obj != nil { // object may have since been deleted
  					change.Name = name
  					change.Val, _ = fieldValue(reflect.ValueOf(obj), name)
  				}
  
  				return true
  			}
  		}
  	}
  
  	return false
  }
docs: // matches returns true if the change matches one of the filter Spec.PropSet