javadoc

JDK documentation in IntelliJ IDEA on Mac OS X

不打扰是莪最后的温柔 提交于 2019-11-28 13:44:36
问题 I'd like to know how to setup IntelliJ to point to the JDK documentation so the documentation popups that display during code completion will show me what the function I'm looking at is going to do. For some reason IntelliJ isn't able to find the JavaDocs by default. I'm also not 100% sure that the documentation is installed with the JDK that's installed with the OS. I don't see them in /System/Library/Frameworks/JavaVM.framework/ but I may be looking in the wrong place. If it's not included,

Javadoc @see or {@link}?

不想你离开。 提交于 2019-11-28 13:43:21
问题 Could someone tell me the difference between javadoc @see and {@link} ? Or rather, when to use which of them? 回答1: The official guidelines on this are pretty clear. The functional differences are: {@link} is an inline link and can be placed wherever you like @see creates its own section In my opinion, {@link} is best used when you literally use a class, field, constructor or method name in your description. The user will be able to click through to the javadoc of what you've linked. I use the

How to get a JavaDoc of a method at run time?

我与影子孤独终老i 提交于 2019-11-28 11:53:19
Its easy to get a method Name of a Class at run time BUT How i can get a JavaDoc of a method at run time ? As the following example Our Class that include JavaDoc of our target method public class MyClass { /** * * @param x value of .... * @return result of .... */ public String myMethod(int x) { return "any value"; } } Our Class that has a main method public class TestJava { public static void main(String[] args) { // get Class method Name at run time String methodName = MyClass.class.getMethods()[0].getName(); System.out.println(methodName); // will print myMethod // How to get a JavaDoc of

Does “/* (non-javadoc)” have a well-understood meaning?

ε祈祈猫儿з 提交于 2019-11-28 11:53:04
Does /* (non-javadoc) have a meaning, beyond pointing out to the reader of source code that a comment block is intentionally not a Javadoc comment? Lately I've seen a lot of code that looks like this: /* * (non-javadoc) * * This method converts widgets to gizmos */ public Foo bar() { ... Is this an established convention of some kind? If so, what does it mean (beyond the obvious literal meaning) and when is it used? According to the info I could find , this was to fix a bug in older versions of the JavaDoc tool (or more likely older version of Eclipse's processing of JavaDoc comments) that

Generate localized javadoc

北战南征 提交于 2019-11-28 11:46:25
I would like to know if there was a simple way of generating localized javadoc : I would like to have translated (for example in french) title and keywords instead of "return", "parameter", "class" in the html. As said by Matt Ball, you can provide the -locale option to javadoc to influence some things. The problem is that tools.jar only contains the default English and additionally one Japanese ( ja ) and one Chinese ( cn_ZH ) translation. I just tried the Chinese one, and it works: it writes 抛出: JSchException instead of Throws: JSchException . So you would have to translate these to your

Is there a standard for documenting GET/POST parameters?

亡梦爱人 提交于 2019-11-28 10:50:44
In a PHP project, even when front controller logic is used for the main application, there can be many stand-alone scripts, ajax snippets and so on. Is there a standardized way - either PHPDoc or something else - to define in the first comment block of the script what GET and/or POST parameters the script will accept / require and of which type they are? I usually help myself by just adding @param s as if the file were a function, and a @return explanation for what the script does and returns, but maybe there is a more specialized way I do not know of. phpDocumentor won't like @param and

JavaDoc Reusable Parameter Values

混江龙づ霸主 提交于 2019-11-28 08:46:48
问题 Alright, I have this code here which is my replacement implementation of the standard Swing TableModel. Which I think is an absolute nightmare, my question is, I have many rowIndex and columIndex parameters, is there a way I can share a description between them for a more standardized, and less finger working way? Thank You!! package atablemodel; import java.util.ArrayList; import javax.swing.table.AbstractTableModel; import javax.swing.table.TableModel; /** * My custom swing TableModel

Maven - Java EE 6 Web Profile Javadocs

萝らか妹 提交于 2019-11-28 08:45:53
By declaring the following dependency: <dependency> <groupId>javax</groupId> <artifactId>javaee-web-api</artifactId> <version>6.0</version> <scope>provided</scope> </dependency> I can use about everything I need for a Java EE 6 Project (Servlet 3.0, JPA 2, EJB, CDI, etc). The problem is: Maven can not download the Javadocs for the dependency (or at least m2eclipse "Download JavaDoc" feature don't work), so Eclipse don't show me the Javadocs when I use the very handy code completion feature. I've found this post specific to Servlet 3.0 API, Maven dependency for Servlet 3.0 API? . Can anyone

JavaDoc: private fields and methods

百般思念 提交于 2019-11-28 07:54:11
问题 What JavaDoc tags should I use in private fields and methods in order to generate javaDoc descriptions? 回答1: See Java Javadoc include Private; you still use the standard JavaDoc comment form but you must instruct the JavaDoc tool to generate the documentation for private members using the -private switch. 来源: https://stackoverflow.com/questions/5655737/javadoc-private-fields-and-methods

What does “optional operation” mean in Javadoc of for example Set#add(E)?

若如初见. 提交于 2019-11-28 07:05:21
问题 When in the java documentation for Set it says in the specification of a method Optional Operation e.g. (emphasis by me) add(E e) Adds the specified element to this set if it is not already present (optional operation) . What does the optional mean here? That if I use a JVM other than SUN/Oracle, this operation may not be provided by that implementation of Java? 回答1: Set is an interface. Classes implementing that interface do not necessarily need to provide an implementation for an optional