Get public API of class file

I have a Java .class-file. Now I’d like to find out which methods an fields it provides to the outside world.

I’d like to get a list of all methods and fields plus their visibility. The output could be:

final static String CONST = “Test”
final public void print(String)
protected(com.stackoverflow.package) void pprint(String)

Hey there.

You cannot do this with SonarQube.

… and it seems you are copying a question from StackOverflow. It looks like there are some useful answers there already.