Flash / Flex / ActionScript/Class/final

Материал из Web эксперт
Перейти к: навигация, поиск

Class with final method

 
public class A {
  final public function m (  ) {
  }
}
public class B extends A {
}



Preventing Classes from Being Extended and Methods from Being Overridden

 
final class A {
}
class B extends A {
}



Preventing Inheritance by using final keyword

 
     
package
{
    public final class Encrypter
    {
        public function encrypt(sourceText:String, key:String):String
        {
        }
    }
}