You have to supply align=center to the general node options, as the first node part isn't treated like the others.
The rectangle split part align option does apply to it, but only affects the box that uses the align option internally (which is also the reason \\ hasn’t the expected effect).
That means that one need to specify align=center and rectangle split part align={center,…}

\documentclass[border=5mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes.multipart,positioning}
\tikzset{
umlclass/.style={
draw=black,fill=yellow!16,rectangle split,rectangle split parts = 3,font = \ttfamily},
umlclass -c/.style={
umlclass,align=center,rectangle split part align={left}}, % = left, left, left
umlclass -r/.style={
umlclass,align=right, rectangle split part align={left}}, % = left, left, left
umlclass +/.style={
umlclass,align=center, rectangle split part align={center,left}}} % = center, left, left
\newcommand*{\umlclasscontent}{<<interface>>\\class\nodepart{second}very long attribute\nodepart{third}method()}
\begin{document}
\begin{tikzpicture}
\node[umlclass -c] {\umlclasscontent};
\node[umlclass -r] at (0,-3) {\umlclasscontent};
\node[umlclass +] at (0,-6) {\umlclasscontent};
\end{tikzpicture}
\end{document}
\documentclass{...}and ending with\end{document}. – egreg Feb 01 '13 at 17:33tikz-umlpackage: is not available on CTAN, but it could be of help for your purpose. – Claudio Fiandrino Feb 01 '13 at 17:53\tikzumlset. – Claudio Fiandrino Feb 01 '13 at 18:09