private boolean referencesCollapsibleProperty(
      ReferenceCollection aliasRefs, Name aliasedName, GlobalNamespace namespace) {
    for (Reference ref : aliasRefs.references) {
      if (ref.getParent() == null) {
        continue;
      }
      if (ref.getParent().isGetProp()) {
        Node propertyNode = ref.getNode().getNext();
        // e.g. if the reference is "alias.b.someProp", this will be "b".
        String propertyName = propertyNode.getString();
        // e.g. if the aliased name is "originalName", this will be "originalName.b".
        String originalPropertyName = aliasedName.getName() + "." + propertyName;
        Name originalProperty = namespace.getOwnSlot(originalPropertyName);
        // If the original property isn't in the namespace or can't be collapsed, keep going.
        if (originalProperty == null || !originalProperty.canCollapse()) {
          continue;
        }
        return true;
      }
    }
    return false;
  }
private boolean referencesCollapsibleProperty ( ReferenceCollection aliasRefs , Name aliasedName , GlobalNamespace namespace ) { for ( Reference ref : aliasRefs . references ) { if ( ref . getParent ( ) == null ) { continue ; } if ( ref . getParent ( ) . isGetProp ( ) ) { Node propertyNode = ref . getNode ( ) . getNext ( ) ; String propertyName = propertyNode . getString ( ) ; String originalPropertyName = aliasedName . getName ( ) + "." + propertyName ; Name originalProperty = namespace . getOwnSlot ( originalPropertyName ) ; if ( originalProperty == null || ! originalProperty . canCollapse ( ) ) { continue ; } return true ; } } return false ; }
Returns whether a ReferenceCollection for some aliasing variable references a property on the
original aliased variable that may be collapsed in CollapseProperties.

<p>See {@link GlobalNamespace.Name#canCollapse} for what can/cannot be collapsed.