Is there any possibility that i can search for a method in a class, trait or object via scala doc, globally? Example: I have a method name and I don\'t know which class it belon
colladoc
The colladoc tool has a more useful search interface to the scaladocs than the standard scaladoc tool.
You can restrict the search to method names by prefixing the search string with "def", as in "def implicitly". If you click on the magnifying glass next to the search box, with an empty search string, you'll get the following handy list of sample queries:
any
searches for everything that has the word any in its name, definition or commentany_
searches for everything that starts with any//_any
searches for all comments that contain a word that ends with anyclass AnyRef
searches for all classes with name AnyReftrait _
searches for all traitsobject _
searches for all objectsclass A_ || class B_
searches for all classes that starts with A or Bclass _ extends _ with _
searches for all classes that extend a class and implement a traitvar _: Int
searches for all values or variables of type Int, vars are displayed before the valsdef toString
searches for all methods with name toStringdef toString : String
searches for all methods with name toString and return type Stringdef _(_) : Boolean
searches for all methods with one argument and returnType Booleandef _(Int, _)
searches for all methods with arguments and the first is of type Intdef _(_, *)
searches for all methods with one or more argumentsdef _(Iterable[_]):Int
searches for all methods that take an Iterable and return Int(Iterable[_]) => Int
equvalent to the above, lambda syntax can also be used for searching for methods.=> (_, _)
searches for all methods that return a tuple with two elements.def _((_) => _)
searches for all methods that have one as first parameter a method that takes and returns any value.
Unfortunately, colladoc's search results can be daunting. If a member exists in many traits/classes due to inheritance (e.g. the sum
method in the collections API), all of the classes are listed in the results.
scaladoc Alphabetical Index
There's no such search in scaladoc itself, but there is an alphabetic index that contains class/object/trait members. Just click on one of the letters below the search bar in the top left corner, and you'll see a list containing classes, objects, traits, and members starting with that letter (or symbols, if you click on the "#" link). Then you can use your browser's find function to look for the member you're interested in.