Encapsulation with Names
local PrivAttr in
{NewName PrivAttr}
class C1
attr PrivAttr
...
end
end
local ProtMeth in
{NewName ProtMeth}
class C2
attr protMeth:ProtMeth
meth !ProtMeth
...
end
meth otherMethod
{self @protMeth}
end
end
end
private
protected
Previous slide
Next slide
Back to first slide
View graphic version