Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to create Javadoc HTML pages which includes some tagged classes and class members?

Sainath Sagar DyapaMay 23 2019 — edited May 23 2019

I have to create javadoc for my project in which I have to consider the classes only which has the tag "@accept" and the class members tagged with "@ignore" should not be considered to show in the generated javadoc html page.

Above mentioned has to be done using JDK8.

Consider the classes A, B and C given below.

A.java

/**
* @accept
*/

public class A {


  
String field1;

  
/**
  * @ignore
  */

  
String field2;

  
public A(String field1) {
  
this.field1 = field1;
  
}

  
/**
  * @ignore
  */

  
public A(String field1, String field2) {
  
this.field1 = field1;
  
this.field2 = field2;
  
}

  
public void setField1(String field1) {
  
this.field1 = field1;
  
}

  
/**
  * @ignore
  */

  
public void setField2(String field2) {
  
this.field2 = field2;
  
}

}

B.java

public class B {  // Fields and methods here...  }

C.java

/** * @accept */ public class C {  String field1;  String field2;  public C(String field1, String field2) { this.field1 = field1; this.field2 = field2; }  }

When I create javadoc html for the above classes, The output should contain the following.

Class
- String field1; // field 
- public A(String field1); // constructor 
- public void setField1(String field1); // method 

Class
- String field1; // field 
- String field2; // field 
- public C(String field1, String field2); // constructor

In the above expected output, We don't see class B as it don't have a tag @accept.

For the class A, we Don't entry for the field field2, constructor A(String field1, String field2) and the method public void setField2(String field2) as they hold the tag @ignore.

Can some one help me in achieving so.

Thanks in advance,

Sainath Sagar Dyapa

Comments

Post Details

Added on May 23 2019
0 comments
193 views