Is there a Java convention to refer to methods, static and otherwise, any specific one or the whole overload, etc?
e.g.
String.valueOf– referring to all overloads ofstatic valueOfString.valueOf(char)– specific overload, formal parameter name omittable?
String.split– looks like a static method, but actually an instance method- Maybe
aString.splitis the convention? - Or maybe
String().split?
- Maybe
String#split– I’ve seen this HTML anchor form too, which I guess is javadoc-influenced
Is there an authoritative recommendation on how to clearly refer to these things?
Using
Class.methodNameto refer to all overloads andClass.methodName(type)to refer to a specific overload is indeed the convention (as recommended by sun in this style guide for javadocs). However there is no convention to distinguish between static and non-static methods (thoughaString.splitwould make sense).