blob: b203daeb390037f76458d05581a8c1885fee71a9 [file] [log] [blame]
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<html>
<body>
This package contains interfaces related to inter-definition <i>references</i>.
<p>
Definitions typically refer to other definitions indirectly, by name,
using an <code>IReference</code>.
This indirection scheme allows definitions to be shared across projects.
This is important because there are many definitions in the core SWCs
that many projects use -- such as the Flash, AIR, and Flex SWCs -- and
it would waste memory to keep of copy of all of them in each project.
</p>
<p>
For example, consider the <code>UIComponent</code> class
in <code>framework.swc</code>, which extends <code>Sprite</code>,
and consider two Flex projects,
one of which links against <code>playerglogal.swc</code>
and the other links against <code>airglobal.swc</code>.
In one project, the superclass of <code>UIComponent</code>
is the <code>flash.display.Sprite</code> class in
<code>playerglobal.swc</code>; in the other, it is the
<code>flash.display.Sprite</code> class in <code>airglobal.swc</code>.
(They could be different, even though they have the same name.)
Therefore, if we want to have a project-independent class definition
for <code>UIComponent</code>, it cannot refer directly to the definition
for its superclass. Instead, it stores an <code>IReference</code> to
<code>flash.display.Sprite</code>, which gets resolved differently
in the two projects.
</p>
<p>
In some cases, is definition can keep direct references to other definitions.
For example, a function definition keeps direct references to the definitions
for its parameters, and a class definition keeps direct references to the
definitions for its events, styles, and effects.
</p>
</body>
</html>