\documentclass{article}
\usepackage[shellescape]{gmp}
\begin{document}
\begin{figure}
\begin{mpost}[use]
input metauml;
Class.A("A")
("-instance: A")
("-A()",
"+instance(): A");
drawObjects(A);
\end{mpost}
\caption{Class \texttt{A} as a singleton}
\label{fig:uml-a}
\end{figure}
\end{document}
How can I make +instance(): A
underlined to mark it as a static method?
Is it possible to disable converting +
and -
to graphics ?
Egreg's solution below works but is there any way to draw "true" underline? For example if I add something below underlined part I would have to move line maually. I want to avoid this.