Skip to content

Commit

Permalink
add javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
aureamunoz committed Feb 21, 2025
1 parent 5b6b3d3 commit 130acb3
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1216,6 +1216,26 @@ private static String appendPath(String prefix, String suffix) {

protected abstract PARAM createIndexedParam();

/**
* Analyzes an endpoint parameter and encapsulates its details into a `PARAM` object.
*
* <p>Steps performed:</p>
* <ul>
* <li><b>Initialization:</b> Creates a `PARAM` object with basic information about the class, method, and annotations.</li>
* <li><b>Parameter type identification:</b> Retrieves annotations like `@PathParam`, `@QueryParam`, `@FormParam`, etc.
* If multiple such annotations are present, an error is thrown. The parameter type is set accordingly.</li>
* <li><b>Special processing based on type:</b> Handles collections (`List`, `Set`, `Map`, `Optional`) differently
* and applies specific rules for `byte[]`, `SseEventSink`, and `AsyncResponse`.</li>
* <li><b>Conversion and compatibility:</b> Searches for registered converters if the parameter is convertible,
* configuring handlers for lists, maps, or primitive types.</li>
* <li><b>Finalization:</b> Determines if the parameter is single or multiple. If it does not match previous cases,
* it is treated as the request body (`@Body`).</li>
* </ul>
*
* <p>In short, this method identifies, classifies, and configures an endpoint parameter,
* ensuring proper conversion and handling.</p>
*/

public PARAM extractParameterInfo(ClassInfo currentClassInfo, ClassInfo actualEndpointInfo,
MethodInfo currentMethodInfo, Map<String, String> existingConverters, AdditionalReaders additionalReaders,
Map<DotName, AnnotationInstance> anns, Type paramType, String errorLocation, Object[] errorLocationParameters,
Expand Down

0 comments on commit 130acb3

Please sign in to comment.