code: private void checkDescendantNames(Name name, boolean nameIsDefined) {
      if (name.props != null) {
        for (Name prop : name.props) {
          // if the ancestor of a property is not defined, then we should emit
          // warnings for all references to the property.
          boolean propIsDefined = false;
          if (nameIsDefined) {
            // if the ancestor of a property is defined, then let's check that
            // the property is also explicitly defined if it needs to be.
            propIsDefined =
                (!propertyMustBeInitializedByFullName(prop)
                    || prop.getGlobalSets() + prop.getLocalSets() > 0);
          }
  
          validateName(prop, propIsDefined);
          checkDescendantNames(prop, propIsDefined);
        }
      }
    }
docs: Checks to make sure all the descendants of a name are defined if they
  are referenced.
  
  @param name A global name.
  @param nameIsDefined If true, {@code name} is defined. Otherwise, it's
  undefined, and any references to descendant names should emit warnings.