# Method local properties
class MMMethod
special MMLocalProperty
+ # Is the method defined with intern
+ fun is_intern: Bool is abstract
+
+ # Is the method abstract
+ fun is_abstract: Bool is abstract
end
# Concrete local classes
var res = new Buffer
res.append(signature.to_html(dctx))
var s = self
- if s.node != null then
- if s.node isa ADeferredMethPropdef then
+ if s isa MMMethod then
+ if s.is_abstract then
res.append(" is abstract")
- else if s.node isa AInternMethPropdef then
+ else if s.is_intern then
res.append(" is intern")
end
end
# Concrete NIT source method
class MMSrcMethod
special MMMethod
+ redef fun is_intern do return false
+ redef fun is_abstract do return false
end
# Concrete NIT source method for an automatic accesor
# Concrete NIT source method for an explicit method
class MMMethSrcMethod
special MMSrcMethod
- redef fun is_init do return _node isa AConcreteInitPropdef
+ redef readable var _is_init: Bool
+ redef readable var _is_intern: Bool
+ redef readable var _is_abstract: Bool
redef readable var _node: nullable AMethPropdef
init(name: Symbol, cla: MMLocalClass, n: nullable AMethPropdef)
do
super(name, cla)
_node = n
+ _is_init = node isa AConcreteInitPropdef
+ _is_intern = node isa AInternMethPropdef
+ _is_abstract = node isa ADeferredMethPropdef
end
end