Lines Matching refs:aClass
31 local function _createIndexWrapper(aClass, f)
33 return aClass.__instanceDict
36 local value = aClass.__instanceDict[name]
49 local function _propagateInstanceMethod(aClass, name, f)
50 f = name == "__index" and _createIndexWrapper(aClass, f) or f
51 aClass.__instanceDict[name] = f
53 for subclass in pairs(aClass.subclasses) do
60 local function _declareInstanceMethod(aClass, name, f)
61 aClass.__declaredMethods[name] = f
63 if f == nil and aClass.super then
64 f = aClass.super.__instanceDict[name]
67 _propagateInstanceMethod(aClass, name, f)
77 local aClass = { name = name, super = super, static = {},
82 …setmetatable(aClass.static, { __index = function(_,k) return rawget(dict,k) or super.static[k] end…
84 setmetatable(aClass.static, { __index = function(_,k) return rawget(dict,k) end })
87 setmetatable(aClass, { __index = aClass.static, __tostring = _tostring,
90 return aClass
93 local function _includeMixin(aClass, mixin)
97 if name ~= "included" and name ~= "static" then aClass[name] = method end
101 aClass.static[name] = method
104 if type(mixin.included)=="function" then mixin:included(aClass) end
105 return aClass
113 isInstanceOf = function(self, aClass)
116 type(aClass) == 'table' and
117 ( aClass == self.class or
118 type(aClass.isSubclassOf) == 'function' and
119 self.class:isSubclassOf(aClass) )