actionscript 3 - How to create internal ctor in ActionScript3 -


i want create internal ctor class in actionscript3 make immutable. want builder class allow create instances of immutable class.
try find answer in adobe's actionscrtip 3 specification not explain happen when no public namespace (accessible) define ctor.

immutable object:

package {      public class immutable {         private var _value1:int;         private var _value2:int;         private var _value3:int;          public function immutable(value1:int, value2:int, value3:int) {             _value1 = value1;             _value2 = value2;             _value3 = value3;         }          public function value1():int {             return _value1;         }          public function value2():int {             return _value2;         }          public function value3():int {             return _value3;         }     } } 

as access modifiers, internal default.

the internal attribute similar default access control in java, although in java there no explicit name level of access, , can achieved through omission of other access modifier. internal attribute available in actionscript 3.0 give option of explicitly signifying intent make property visible callers within own package.

as constructor, can't specify internal. if omit access modifier, default constructor accessible (public)


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -