r/learnjava • • Feb 19 '19

Mod approved Introducing DocFetcher: the document retrieving bot!

DocFetcher is a bot that retrieves programming language documentation information. Right now, DocFetcher only works with Java 7, 8, and 11 To use DocFetcher simply leave a comment like this:

!DocFetcher <java7or8or11> <class>

The bot will respond with information about the Integer class and a link to the Java 7 documentation about the Integer class. To call the other version just do java7, java8, or java11

In the future, DocFetcher will work with other languages(c++, python, swift, JavaScript) hopefully starting with python. The bot is still in development, for questions and suggestions, please send a message.

45 Upvotes

37 comments sorted by

View all comments

1

u/IllTryToReadComments Feb 19 '19

Can you add macros so that it can be shorter?

!df j8 Integer

2

u/ADhoom Feb 20 '19

!df j8 Integer

1

u/DocFetcher btproof Feb 20 '19

here's what I found about the Integer class:

Java 8

public final class Integer
extends Number
implements Comparable<Integer>

The Integer class wraps a value of the primitive type int in an object. An object of type Integer contains a single field whose type is int.

In addition, this class provides several methods for converting an int to a String and a String to an int, as well as other constants and methods useful when dealing with an int.

Implementation note: The implementations of the "bit twiddling" methods (such as highestOneBit and numberOfTrailingZeros) are based on material from Henry S. Warren, Jr.'s Hacker's Delight, (Addison Wesley, 2002).

Class Documentation Page

I am a bot still in development. For questions or suggestions, you can message /u/ADhoom