package serialize { import flash.errors.IllegalOperationError; //ABSTRACT Class public class CreateSerializer { public function doStuff():void { var serializer:SerializerBase = this.factoryMethod(); serializer.manipulate(); } //ABSTACT Method protected function factoryMethod():SerializerBase { throw new IllegalOperationError("Abstract method: must be overidden in a subclass"); return null; } } }