Refactored abstract method creation

This commit is contained in:
Jeena 2014-07-27 13:03:40 +02:00
parent 1a71fa38f9
commit 7c783d19e8
6 changed files with 72 additions and 163 deletions

View file

@ -0,0 +1,18 @@
define([
"Lib/Utilities/Exception"
],
function (Exception) {
function Abstract() {
}
Abstract.prototype.addMethod = function(methodName, params) {
this.prototype[methodName] = function() {
throw new Exception("Abstract method", this, methodName + "(" + params.join(', ') + ") not overwritten.");
}
}
return Abstract;
});