1

I am tempted to write something as follows:

StringBuilder.append(String.format("%d %f", x, y));

But, I know that I am really working with an instance of StringBuilder and I do not mean to be invoking a static append method. Is there a commonly practiced way of writing such Javadoc or pseudo code?

H2ONaCl
  • 10,644
  • 14
  • 70
  • 114

1 Answers1

2

I like to write StringBuilder#append(...) here to indicate that this is an instance method to be called on an instance of StringBuilder, not a class (static) method, contrasting to a class method like String.valueOf(...).

I'm not sure there is a definite convention about this, though.

Paŭlo Ebermann
  • 73,284
  • 20
  • 146
  • 210
  • This question (and my answer) is about using different notations for static and nonstatic members, not about using `#` in Javadoc `@see` tags (where you use it for both static and nonstatic members). I clarified my answer to make this clear. – Paŭlo Ebermann Jun 19 '12 at 20:03