Packagecom.adobe.csawlib
Classpublic class CSHostObject
InheritanceCSHostObject Inheritance flash.utils.Proxy
Subclasses AEApp, AngleComboboxes, AngleComboboxes, AngleEditboxes, AngleEditboxes, AnimationBehaviors, AnimationBehaviors, App, Application, Application, Asset, Assets, AssignedStories, AssignedStories, AssignedStory, AssignedStory, Assignment, Assignment, Assignments, Assignments, AutoCorrectTable, AutoCorrectTable, AutoCorrectTables, AutoCorrectTables, BackgroundTask, BackgroundTask, BackgroundTasks, BackgroundTasks, Behavior, Behavior, Behaviors, Behaviors, BitmapData, Book, BookContent, BookContents, Bookmark, Bookmarks, Books, BorderPanels, BorderPanels, BridgeTalk, BridgeTalkHeaders, BuildingBlock, BuildingBlock, BuildingBlocks, BuildingBlocks, Buttons, Buttons, CacheData, CacheElement, Cell, Cell, Cells, Cells, CellStyle, CellStyle, CellStyleGroup, CellStyleGroup, CellStyleGroups, CellStyleGroups, CellStyles, CellStyles, Change, Change, Changes, Changes, Characters, Characters, CharacterStyle, CharacterStyle, CharacterStyleGroup, CharacterStyleGroup, CharacterStyleGroups, CharacterStyleGroups, CharacterStyles, CharacterStyles, CheckboxControls, CheckboxControls, Color, Colors, Colors, Column, Column, Columns, Columns, CompositeFont, CompositeFontEntries, CompositeFontEntry, CompositeFonts, Condition, Condition, Conditions, Conditions, ConditionSet, ConditionSet, ConditionSets, ConditionSets, CrossReference, CrossReferenceFormat, CrossReferenceFormat, CrossReferenceFormats, CrossReferenceFormats, CrossReferences, CrossReferenceSources, CrossReferenceSources, CSEnumBase, DashedStrokeStyles, DataMergeField, DataMergeFields, DataMergeImagePlaceholder, DataMergeImagePlaceholders, DataMergeTextPlaceholder, DataMergeTextPlaceholders, Dialog, Dialog, DialogColumn, DialogColumn, DialogColumns, DialogColumns, DialogRow, DialogRow, DialogRows, DialogRows, Dialogs, Dialogs, DisplaySetting, DisplaySettings, Document, Document, Document, DocumentPreset, DocumentPreset, DocumentPresets, DocumentPresets, Documents, Documents, Documents, DottedStrokeStyles, Dropdowns, Dropdowns, DTDs, DTDs, EnablingGroups, EnablingGroups, EPSs, EPSs, EPSTexts, EPSTexts, Event, Event, EventListener, EventListener, EventListeners, EventListeners, Events, Events, ExtensionHandler, ExtensionModel, Favorites, FilterDescription, FlattenerPreset, FlattenerPresets, Font, Font, Fonts, Fonts, Footnote, Footnote, Footnotes, Footnotes, FormFields, FormFields, globals, GotoAnchorBehaviors, GotoAnchorBehaviors, GotoFirstPageBehaviors, GotoFirstPageBehaviors, GotoLastPageBehaviors, GotoLastPageBehaviors, GotoNextPageBehaviors, GotoNextPageBehaviors, GotoNextStateBehaviors, GotoNextStateBehaviors, GotoNextViewBehaviors, GotoNextViewBehaviors, GotoPageBehaviors, GotoPageBehaviors, GotoPreviousPageBehaviors, GotoPreviousPageBehaviors, GotoPreviousStateBehaviors, GotoPreviousStateBehaviors, GotoPreviousViewBehaviors, GotoPreviousViewBehaviors, GotoStateBehaviors, GotoStateBehaviors, GotoURLBehaviors, GotoURLBehaviors, Gradients, Gradients, GradientStop, GradientStop, GradientStops, GradientStops, GraphicLayer, GraphicLayer, GraphicLayers, GraphicLayers, GraphicLines, GraphicLines, Graphics, Graphics, Groups, Groups, Guide, Guide, Guides, Guides, HiddenText, HiddenText, HiddenTexts, HiddenTexts, Hyperlink, Hyperlink, HyperlinkExternalPageDestination, HyperlinkExternalPageDestination, HyperlinkExternalPageDestinations, HyperlinkExternalPageDestinations, HyperlinkPageDestination, HyperlinkPageDestinations, HyperlinkPageItemSource, HyperlinkPageItemSource, HyperlinkPageItemSources, HyperlinkPageItemSources, Hyperlinks, Hyperlinks, HyperlinkTextDestination, HyperlinkTextDestination, HyperlinkTextDestinations, HyperlinkTextDestinations, HyperlinkTextSource, HyperlinkTextSource, HyperlinkTextSources, HyperlinkTextSources, HyperlinkURLDestination, HyperlinkURLDestination, HyperlinkURLDestinations, HyperlinkURLDestinations, HyphenationException, HyphenationException, HyphenationExceptions, HyphenationExceptions, IconListPanelette, IdleTask, IdleTask, IdleTasks, IdleTasks, IllustratorHostObject, Images, Images, ImportedPages, ImportedPages, Index, Indexes, IndexingSortOption, IndexingSortOption, IndexingSortOptions, IndexingSortOptions, IndexSection, IndexSections, Infoset, InfosetMemberDescription, Ink, Ink, Inks, Inks, InsertionPoints, InsertionPoints, InspectorPanel, IntegerComboboxes, IntegerComboboxes, IntegerEditboxes, IntegerEditboxes, KinsokuTable, KinsokuTable, KinsokuTables, KinsokuTables, Language, Language, Languages, Languages, LanguagesWithVendors, LanguagesWithVendors, LanguageWithVendors, LanguageWithVendors, Layer, Layer, Layers, Layers, LayoutWindows, Libraries, Library, Lines, Lines, Link, Link, Links, Links, MacOS, MasterSpread, MasterSpread, MasterSpreads, MasterSpreads, MeasurementComboboxes, MeasurementComboboxes, MeasurementEditboxes, MeasurementEditboxes, MediaItems, MediaItems, Menu, Menu, MenuAction, MenuAction, MenuActions, MenuActions, MenuElement, MenuElement, MenuElement, MenuElements, MenuElements, MenuItems, MenuItems, Menus, Menus, MenuSeparators, MenuSeparators, Metadata, MixedInkGroups, MixedInkGroups, MixedInks, MixedInks, ModalOperator, MojikumiTable, MojikumiTable, MojikumiTables, MojikumiTables, MotionPreset, MotionPresets, MovieBehaviors, MovieBehaviors, Movies, Movies, MultiStateObjects, MultiStateObjects, NamedGrid, NamedGrids, Navbar, NavigationPoint, NavigationPoint, NavigationPoints, NavigationPoints, NestedGrepStyle, NestedGrepStyle, NestedGrepStyles, NestedGrepStyles, NestedLineStyle, NestedLineStyle, NestedLineStyles, NestedLineStyles, NestedStyle, NestedStyle, NestedStyles, NestedStyles, Note, Note, Notes, Notes, NumberingList, NumberingList, NumberingLists, NumberingLists, ObjectStyle, ObjectStyleGroup, ObjectStyleGroups, ObjectStyles, OpacityGradientStop, OpacityGradientStops, OpenFileBehaviors, OpenFileBehaviors, Operand, Operator, Ovals, Ovals, Page, Page, PageItem, PageItem, PageItems, PageItems, PageReference, PageReferences, Pages, Pages, Panel, Panel, Panels, Panels, ParagraphDestinations, ParagraphDestinations, Paragraphs, Paragraphs, ParagraphStyle, ParagraphStyle, ParagraphStyleGroup, ParagraphStyleGroup, ParagraphStyleGroups, ParagraphStyleGroups, ParagraphStyles, ParagraphStyles, Path, Path, PathPoint, PathPoint, PathPoints, PathPoints, Paths, Paths, PDFExportPreset, PDFExportPresets, PDFs, PDFs, PercentComboboxes, PercentComboboxes, PercentEditboxes, PercentEditboxes, PhotoshopHostObject, PICTs, PICTs, Polygons, Polygons, Preference, Preference, Preferences, Preferences, Preferences, PreflightProcess, PreflightProcesses, PreflightProfile, PreflightProfileRule, PreflightProfileRules, PreflightProfiles, PreflightRule, PreflightRuleInstances, PreflightRules, PrinterPreset, PrinterPresets, ProgressOperator, QuickSearchItem, RadiobuttonControls, RadiobuttonControls, RadiobuttonGroups, RadiobuttonGroups, Rank, RealComboboxes, RealComboboxes, RealEditboxes, RealEditboxes, Rectangles, Rectangles, Row, Row, Rows, Rows, RuleDataObject, RuleDataObjects, Scope, ScriptMenuActions, ScriptMenuActions, SearchCondition, SearchCriteria, SearchDefinition, SearchDetails, SearchSpecification, Section, Section, Sections, Sections, ShowHideFieldsBehaviors, ShowHideFieldsBehaviors, Snippet, Snippets, SortCriterion, SoundBehaviors, SoundBehaviors, Sounds, Sounds, SplineItems, SplineItems, Spread, Spread, Spreads, Spreads, State, State, States, States, StaticTexts, StaticTexts, Stories, Stories, Story, Story, StoryWindows, StripedStrokeStyles, StrokeStyle, StrokeStyle, StrokeStyles, StrokeStyles, Submenus, Submenus, Swatch, Swatch, Swatches, Swatches, TabbedPalette, Table, Table, Tables, Tables, TableStyle, TableStyle, TableStyleGroup, TableStyleGroup, TableStyleGroups, TableStyleGroups, TableStyles, TableStyles, TabStop, TabStop, TabStops, TabStops, Text, Text, TextColumns, TextColumns, TextEditboxes, TextEditboxes, TextFrames, TextFrames, TextMacro, TextMacros, TextPanelette, TextPath, TextPath, TextPaths, TextPaths, Texts, Texts, TextStyleRanges, TextStyleRanges, TextVariable, TextVariable, TextVariableInstance, TextVariableInstance, TextVariableInstances, TextVariableInstances, TextVariables, TextVariables, Thumbnail, ThumbnailPanelette, TimingGroup, TimingGroups, TimingList, TimingLists, TimingTarget, TimingTargets, Tints, Tints, TOCStyle, TOCStyleEntries, TOCStyleEntry, TOCStyles, Topic, Topics, TransformationMatrices, TransformationMatrices, TransformationMatrix, TransformationMatrix, TrapPreset, TrapPreset, TrapPresets, TrapPresets, UserDictionaries, UserDictionaries, UserDictionary, UserDictionary, ValidationError, ValidationError, ValidationErrors, ValidationErrors, ViewZoomBehaviors, ViewZoomBehaviors, Widget, Widget, Widgets, Widgets, Window, Window, Windows, Windows, WMFs, WMFs, Words, Words, XMLAttribute, XMLAttribute, XMLAttributes, XMLAttributes, XMLComments, XMLComments, XMLElements, XMLElements, XMLExportMap, XMLExportMap, XMLExportMaps, XMLExportMaps, XMLImportMap, XMLImportMap, XMLImportMaps, XMLImportMaps, XMLInstructions, XMLInstructions, XMLItem, XMLItem, XMLItems, XMLItems, XMLRuleMatchData, XMLRuleProcessor, XMLRuleProcessors, XmlStories, XmlStories, XMLTag, XMLTag, XMLTags, XMLTags

Base for all our wrapper classes, which encapsulates host object and all interaction with the host through the HBAPI.



Public Properties
 PropertyDefined By
  hostObjectDelegate : HostObject
Getter for the delegate
CSHostObject
Public Methods
 MethodDefined By
  
CSHostObject(delegateHostObject:HostObject = null)
Constructor
CSHostObject
  
filterArgsForHBAPI(args:Array):Array
[static] Function to clean up the argument list and put it into a format that makes sense for HBAPI.
CSHostObject
  
filterSingleObjectForHBAPI(value:Object):Object
[static]
CSHostObject
  
getClassObjectForName(className:String):HostObject
[static] This returns a "Class" object, meaning, a HostObject that can be used to make static function calls or get static properties
CSHostObject
  
getSpecialTranslation(className:String, ho:HostObject, expectedReturnType:Class, ownerName:String):*
[static]
CSHostObject
  
hostCall(name:String, expectedReturnType:Class, rawargs:Array):*
Encapsulates a function call to the host
CSHostObject
  
hostCallStatic(className:String, methodName:String, expectedReturnType:Class, rawargs:Array):*
[static] Implements a safe call of a static method on the host
CSHostObject
  
hostGet(name:String, expectedReturnType:Class):*
Encapsulates a property get to the host
CSHostObject
  
hostGetIndex(idx:Object, expectedReturnType:Class):*
Encapsulates a indexed get to the host
CSHostObject
  
hostGetStatic(className:String, propertyName:String, expectedReturnType:Class):*
[static] Implements a safe get of a static property on the host Used by for instance, all the enum implementations.
CSHostObject
  
hostSet(name:String, rawvalue:*):void
Encapsulates a property set to the host
CSHostObject
  
hostSetStatic(className:String, propertyName:String, rawvalue:*):*
[static] Implements a safe set of a static property on the host
CSHostObject
  
isDescendedFrom(clz:Class, ancClass:Class):Boolean
[static] Efficiently determines whether or not one class descends from another in inheritance hierarchy- class relationships are cached by the ClassUtils implementation- (uses org.as3commons lib to quickly discover class hierarchy.
CSHostObject
  
replaceDefaultArgs(args:Array, defaultArgs:Array):Array
Function to tidy up arguments prior to call.
CSHostObject
  
wrapReturnedHostObject(rawObject:Object, expectedReturnType:Class, client:CSHostObject, propertyName:String):*
[static] Method used on static/normal get/ hostcalls
CSHostObject
Protected Methods
 MethodDefined By
  
callProperty(methodName:*, ... args):*
[override]
CSHostObject
  
createWithArgs(args:Array):void
CSHostObject
  
getProperty(name:*):*
[override]
CSHostObject
  
hostCreate(args:Array):void
CSHostObject
  
setProperty(name:*, value:*):void
[override]
CSHostObject
Property Detail
hostObjectDelegateproperty
hostObjectDelegate:HostObject

Getter for the delegate


Implementation
    public function get hostObjectDelegate():HostObject
    public function set hostObjectDelegate(value:HostObject):void
Constructor Detail
CSHostObject()Constructor
public function CSHostObject(delegateHostObject:HostObject = null)

Constructor

Parameters
delegateHostObject:HostObject (default = null)
Method Detail
callProperty()method
override flash_proxy function callProperty(methodName:*, ... args):*

Parameters

methodName:*
 
... args

Returns
*
createWithArgs()method 
protected function createWithArgs(args:Array):void

Parameters

args:Array

filterArgsForHBAPI()method 
public static function filterArgsForHBAPI(args:Array):Array

Function to clean up the argument list and put it into a format that makes sense for HBAPI. Note that this occurs after replaceDefaultArgs and is just before we do, say, a __call to the host.

Parameters

args:Array — the inbound actual parameters

Returns
Array — array of parameters that will make sense for the host when sent over HBAPI
filterSingleObjectForHBAPI()method 
public static function filterSingleObjectForHBAPI(value:Object):Object

Parameters

value:Object — object to translate for forward calls

Returns
Object — the translated object that can safely be used to call through to the host
getClassObjectForName()method 
public static function getClassObjectForName(className:String):HostObject

This returns a "Class" object, meaning, a HostObject that can be used to make static function calls or get static properties

Parameters

className:String — qualified name of the class object

Returns
HostObject — a class object for given className, which is the root HostObject if the className is empty or null
getProperty()method 
override flash_proxy function getProperty(name:*):*

Parameters

name:*

Returns
*
getSpecialTranslation()method 
public static function getSpecialTranslation(className:String, ho:HostObject, expectedReturnType:Class, ownerName:String):*

Parameters

className:String
 
ho:HostObject
 
expectedReturnType:Class
 
ownerName:String

Returns
*
hostCall()method 
public function hostCall(name:String, expectedReturnType:Class, rawargs:Array):*

Encapsulates a function call to the host

Parameters

name:String — the name of the host function to call
 
expectedReturnType:Class — what type we believe the host should return
 
rawargs:Array — the actual parameters sent by the client

Returns
* — a wrapped host object (or perhaps more primitive type?)
hostCallStatic()method 
public static function hostCallStatic(className:String, methodName:String, expectedReturnType:Class, rawargs:Array):*

Implements a safe call of a static method on the host

Parameters

className:String — identifies the host classname that we want to call the method on
 
methodName:String — identifies method to call
 
expectedReturnType:Class — what class we want the return type to be
 
rawargs:Array — the arguments to pass to the method

Returns
*
hostCreate()method 
protected function hostCreate(args:Array):void

Parameters

args:Array

hostGet()method 
public function hostGet(name:String, expectedReturnType:Class):*

Encapsulates a property get to the host

Parameters

name:String — the name of the property to dereference
 
expectedReturnType:Class — what type we believe the host should return for this property

Returns
* — a wrapped host object (or perhaps more primitive type?), returns null in the event that the host throws an error on the getter
hostGetIndex()method 
public function hostGetIndex(idx:Object, expectedReturnType:Class):*

Encapsulates a indexed get to the host

Parameters

idx:Object — the id of the index (either integer, or a name)
 
expectedReturnType:Class — what type we believe the host should return for this property

Returns
* — a wrapped host object (or perhaps more primitive type?)
hostGetStatic()method 
public static function hostGetStatic(className:String, propertyName:String, expectedReturnType:Class):*

Implements a safe get of a static property on the host Used by for instance, all the enum implementations. Marked public to be easily testable.

Parameters

className:String — identifies the host classname that we want a property from
 
propertyName:String — identifies property of interest
 
expectedReturnType:Class — what class we want the return type to be

Returns
*
hostSet()method 
public function hostSet(name:String, rawvalue:*):void

Encapsulates a property set to the host

Parameters

name:String — the name of the property to set
 
rawvalue:* — the new value it should be set to

hostSetStatic()method 
public static function hostSetStatic(className:String, propertyName:String, rawvalue:*):*

Implements a safe set of a static property on the host

Parameters

className:String — identifies the host classname that we want a property from
 
propertyName:String — identifies property of interest
 
rawvalue:* — the value to set the property to

Returns
*
isDescendedFrom()method 
public static function isDescendedFrom(clz:Class, ancClass:Class):Boolean

Efficiently determines whether or not one class descends from another in inheritance hierarchy- class relationships are cached by the ClassUtils implementation- (uses org.as3commons lib to quickly discover class hierarchy.

Parameters

clz:Class — the class whose ancestry we're interested in
 
ancClass:Class — a potential ancestor

Returns
Boolean — true if clz descended from ancClass, false otherwise
replaceDefaultArgs()method 
public function replaceDefaultArgs(args:Array, defaultArgs:Array):Array

Function to tidy up arguments prior to call. Marked public to be more easily testable. TODO: this could be static, it doesn't need to be an instance func

Parameters

args:Array
 
defaultArgs:Array

Returns
Array
setProperty()method 
override flash_proxy function setProperty(name:*, value:*):void

Parameters

name:*
 
value:*

wrapReturnedHostObject()method 
public static function wrapReturnedHostObject(rawObject:Object, expectedReturnType:Class, client:CSHostObject, propertyName:String):*

Method used on static/normal get/ hostcalls

Parameters

rawObject:Object — hostobject that came back from host
 
expectedReturnType:Class — class that we expect to hand back return to client as
 
client:CSHostObject
 
propertyName:String

Returns
* — object possibly encapsulating a host object