1 %%% -*- mode: latex; TeX-PDF-mode: t -*-
3 \documentclass{article
}
4 \usepackage[palatino, helvetica, courier, maths=cmr
]{mdwfonts
}
9 \usetikzlibrary{positioning
}
11 \errorcontextlines=
999
17 order/.append style=
{color=green!
70!black
},
18 code/.append style=
{font=
\sffamily},
19 action/.append style=
{font=
\itshape},
20 method/.append style=
{rectangle, draw=black, thin, fill=blue!
30,
21 text height=
\ht\strutbox, text depth=
\dp\strutbox,
25 \node (
#10)
[method,
#2] {#3};
26 \node (
#11)
[method, above=
6mm of
#10] {#3};
27 \draw [->
] ($(
#10.north)!
.5!(
#10.north west) + (
0mm,
1mm)$) --
29 node
[code, left=
4pt, midway
] {next_method
};
30 \draw [<-
] ($(
#10.north)!
.5!(
#10.north east) + (
0mm,
1mm)$) --
32 node
[action, right=
4pt, midway
] {return
};
33 \draw [->
] ($(
#11.north)!
.5!(
#11.north west) + (
0mm,
1mm)$) --
35 node
[code, left=
4pt, midway
] {next_method
}
36 node (ld)
[above
] {$
\smash\vdots\mathstrut$
};
37 \draw [<-
] ($(
#11.north)!
.5!(
#11.north east) + (
0mm,
1mm)$) --
39 node
[action, right=
4pt, midway
] {return
}
40 node (rd)
[above
] {$
\smash\vdots\mathstrut$
};
41 \draw [->
] ($(ld.north) + (
0mm,
1mm)$) -- ++(
0mm,
4mm)
42 node
[code, left=
4pt, midway
] {next_method
};
43 \draw [<-
] ($(rd.north) + (
0mm,
1mm)$) -- ++(
0mm,
4mm)
44 node
[action, right=
4pt, midway
] {return
};
45 \node (p) at ($(ld.north)!
.5!(rd.north)$)
{};
46 \node (
#1n)
[method, above=
5mm of p
] {#3};
47 \draw [->, order
] ($(
#10.south east) + (
4mm,
1mm)$) --
48 ($(
#1n.north east) + (
4mm, -
1mm)$)
49 node
[midway, right, align=left
] {Most to \\ least \\ specific
};
}
51 \delgstack{a
}{}{Around method
}
52 \draw [<-
] ($(a0.south)!
.5!(a0.south west) - (
0mm,
1mm)$) --
54 \draw [->
] ($(a0.south)!
.5!(a0.south east) - (
0mm,
1mm)$) --
56 node
[action, right=
4pt, midway
] {return
};
58 \draw [->
] ($(an.north)!
.6!(an.north west) + (
0mm,
1mm)$) --
60 node
[code, midway, left=
3mm
] {next_method
}
61 node (b0)
[method, above left =
1mm +
4mm and -
6mm -
4mm
] {};
62 \node (b1)
[method
] at ($(b0) - (
2mm,
2mm)$)
{};
63 \node (bn)
[method
] at ($(b1) - (
2mm,
2mm)$)
{Before method
};
64 \draw [->, order
] ($(bn.west) - (
6mm,
0mm)$) -- ++(
12mm,
12mm)
65 node
[midway, above left, align=center
] {Most to \\ least \\ specific
};
66 \draw [->
] ($(b0.north east) + (-
10mm,
1mm)$) -- ++(
8mm,
8mm)
69 \delgstack{m
}{above right=
1mm and
0mm of an.west |- p
}{Primary method
}
70 \draw [->
] ($(mn.north)!
.5!(mn.north west) + (
0mm,
1mm)$) -- ++(
0mm,
4mm)
71 node
[code, left=
4pt, midway
] {next_method
}
72 node
[above right =
0mm and -
8mm
]
73 {$
\vcenter{\hbox{\Huge\textcolor{red
}{!
}}}
74 \vcenter{\hbox{\begin{tabular
}[c
]{l
}
75 \textsf{next_method
} \\
79 \draw [->,
color=blue, dotted
]
80 ($(m0.south)!
.2!(m0.south east) - (
0mm,
1mm)$) --
81 ($(an.north)!
.2!(an.north east) + (
0mm,
1mm)$)
82 node
[midway, sloped, below
] {Return value
};
84 \draw [<-
] ($(an.north)!
.6!(an.north east) + (
0mm,
1mm)$) --
86 node
[action, midway, right=
3mm
] {return
}
87 node (f0)
[method, above right =
1mm and -
6mm
] {};
88 \node (f1)
[method
] at ($(f0) + (-
2mm,
2mm)$)
{};
89 \node (fn)
[method
] at ($(f1) + (-
2mm,
2mm)$)
{After method
};
90 \draw [<-, order
] ($(f0.east) + (
6mm,
0mm)$) -- ++(-
12mm,
12mm)
91 node
[midway, above right, align=center
] {Least to \\ most \\ specific
};
92 \draw [<-
] ($(fn.north west) + (
6mm,
1mm)$) -- ++(-
8mm,
8mm);