See: Description
Interface | Description |
---|---|
INamespaceReference |
INamespaceReferences are used in the symbol table to represent
references to namespaces in two contexts:
a namespace specified on a
const , var ,
function , and namespace definition
inside a class or interface ;
a namespace specified in a use namespace directive. |
IReference |
An
IReference represents a reference-by-name to an
IDefinition . |
IResolvedQualifiersReference |
A subinterface of
IReference where all the qualifiers in the
reference are already resolved to namespace definitions. |
Class | Description |
---|---|
ReferenceFactory |
A factory class to create instances of type
IReference . |
Definitions typically refer to other definitions indirectly, by name,
using an IReference
.
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.
For example, consider the UIComponent
class
in framework.swc
, which extends Sprite
,
and consider two Flex projects,
one of which links against playerglogal.swc
and the other links against airglobal.swc
.
In one project, the superclass of UIComponent
is the flash.display.Sprite
class in
playerglobal.swc
; in the other, it is the
flash.display.Sprite
class in airglobal.swc
.
(They could be different, even though they have the same name.)
Therefore, if we want to have a project-independent class definition
for UIComponent
, it cannot refer directly to the definition
for its superclass. Instead, it stores an IReference
to
flash.display.Sprite
, which gets resolved differently
in the two projects.
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.
Copyright © 2016 The Apache Software Foundation. All rights reserved.