Android studio generates Javadoc automatically

Time:2019-12-2

If you want to annotate your methods, Android Studio provides a simple way to implement it.

First define your method, whether it’s a parameter value or a return value, then hover over the method and type/**andEnter, you will see the Javadoc comment added to your method name.

  1. Define your approach

    private boolean shouldGenerateAutoComments(String title, boolean isValid, List<String> listNames){

           // function code
           return true;

    }

  2. Hover over the method and type/**, and then clickEnter

/**
  *@param title
  *@param isValid
  *@param listNames
  *@return
  */  
private boolean shouldGenerateAutoComments(String title, boolean isValid, List<String> listNames){
    // function code
    return true;
}

Recommended Today

How to share queues with hypertools 2.5

Share queue with swote To realize asynchronous IO between processes, the general idea is to use redis queue. Based on the development of swote, the queue can also be realized through high-performance shared memory table. Copy the code from the HTTP tutorial on swoole’s official website, and configure four worker processes to simulate multiple producers […]