code: public boolean associate(ScriptableObject topScope)
      {
          if (topScope.getParentScope() != null) {
              // Can only associate cache with top level scope
              throw new IllegalArgumentException();
          }
          if (this == topScope.associateValue(AKEY, this)) {
              associatedScope = topScope;
              return true;
          }
          return false;
      }
docs: Associate ClassCache object with the given top-level scope.
  The ClassCache object can only be associated with the given scope once.
  
  @param topScope scope to associate this ClassCache object with.
  @return true if no previous ClassCache objects were embedded into
  the scope and this ClassCache were successfully associated
  or false otherwise.
  
  @see #get(Scriptable scope)