node [midway, right, align=left]
{Most to \\ least \\ specific};}
- \delgstack{a}{}{Around method}
+ \delgstack{a}{}{@|around| method}
\draw [<-] ($(a0.south)!.5!(a0.south west) - (0mm, 1mm)$) --
++(0mm, -4mm);
\draw [->] ($(a0.south)!.5!(a0.south east) - (0mm, 1mm)$) --
node [code, midway, left=3mm] {next_method}
node (b0) [method, above left = 1mm + 4mm and -6mm - 4mm] {};
\node (b1) [method] at ($(b0) - (2mm, 2mm)$) {};
- \node (bn) [method] at ($(b1) - (2mm, 2mm)$) {Before method};
+ \node (bn) [method] at ($(b1) - (2mm, 2mm)$) {@|before| method};
\draw [->, order] ($(bn.west) - (6mm, 0mm)$) -- ++(12mm, 12mm)
node [midway, above left, align=center] {Most to \\ least \\ specific};
\draw [->] ($(b0.north east) + (-10mm, 1mm)$) -- ++(8mm, 8mm)
node [action, midway, right=3mm] {return}
node (f0) [method, above right = 1mm and -6mm] {};
\node (f1) [method] at ($(f0) + (-2mm, 2mm)$) {};
- \node (fn) [method] at ($(f1) + (-2mm, 2mm)$) {After method};
+ \node (fn) [method] at ($(f1) + (-2mm, 2mm)$) {@|after| method};
\draw [<-, order] ($(f0.east) + (6mm, 0mm)$) -- ++(-12mm, 12mm)
node [midway, above right, align=center]
{Least to \\ most \\ specific};
If there any remaining @|around| methods, then @|next_method| invokes the
next most specific such method, returning whichever value that method
- returns; otherwise the behaviour of @|next_method| is to invoke the before
- methods (if any), followed by the most specific primary method, followed by
- the @|around| methods (if any), and to return whichever value was returned
- by the most specific primary method, as described in the following items.
- That is, the behaviour of the least specific @|around| method's
- @|next_method| function is exactly the behaviour that the effective method
- would have if there were no @|around| methods. Note that if the
- least-specific @|around| method calls its @|next_method| more than once
- then the whole sequence of @|before|, primary, and @|after| methods occurs
- multiple times.
+ returns; otherwise the behaviour of @|next_method| is to invoke the
+ @|before| methods (if any), followed by the most specific primary method,
+ followed by the @|around| methods (if any), and to return whichever value
+ was returned by the most specific primary method, as described in the
+ following items. That is, the behaviour of the least specific @|around|
+ method's @|next_method| function is exactly the behaviour that the
+ effective method would have if there were no @|around| methods. Note that
+ if the least-specific @|around| method calls its @|next_method| more than
+ once then the whole sequence of @|before|, primary, and @|after| methods
+ occurs multiple times.
The value returned by the most specific @|around| method is the value
returned by the effective method.