1
1
/*
2
- * Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 2019, 2022 Oracle and/or its affiliates. All rights reserved.
3
3
*
4
4
* This program and the accompanying materials are made available under the
5
5
* terms of the Eclipse Public License v. 2.0, which is available at
16
16
17
17
package org .glassfish .jersey .wadl .doclet ;
18
18
19
+ import jdk .javadoc .doclet .DocletEnvironment ;
19
20
import org .glassfish .jersey .server .wadl .internal .generators .resourcedoc .model .ClassDocType ;
20
21
import org .glassfish .jersey .server .wadl .internal .generators .resourcedoc .model .MethodDocType ;
21
22
import org .glassfish .jersey .server .wadl .internal .generators .resourcedoc .model .ParamDocType ;
@@ -60,6 +61,7 @@ public interface DocProcessor {
60
61
* @param classDocType the {@link ClassDocType} to extend. This will later be processed by the
61
62
* {@link org.glassfish.jersey.server.wadl.WadlGenerator}s.
62
63
*/
64
+ @ Deprecated
63
65
void processClassDoc (TypeElement classDoc , ClassDocType classDocType );
64
66
65
67
/**
@@ -69,6 +71,7 @@ public interface DocProcessor {
69
71
* @param methodDocType the related {@link MethodDocType} that will later be processed by the
70
72
* {@link org.glassfish.jersey.server.wadl.WadlGenerator}s.
71
73
*/
74
+ @ Deprecated
72
75
void processMethodDoc (ExecutableElement methodDoc , MethodDocType methodDocType );
73
76
74
77
/**
@@ -79,6 +82,45 @@ public interface DocProcessor {
79
82
* @param paramDocType the {@link ParamDocType} to extend. This will later be processed by the
80
83
* {@link org.glassfish.jersey.server.wadl.WadlGenerator}s.
81
84
*/
85
+ @ Deprecated
82
86
void processParamTag (VariableElement parameter , ParamDocType paramDocType );
83
87
88
+ /**
89
+ * Use this method to extend the provided {@link ClassDocType} with the information from
90
+ * the given {@link TypeElement}.
91
+ *
92
+ * @param classDoc the class javadoc
93
+ * @param classDocType the {@link ClassDocType} to extend. This will later be processed by the
94
+ * {@link org.glassfish.jersey.server.wadl.WadlGenerator}s.
95
+ * @param docEnv the doclet environment used to extract info from classDoc
96
+ */
97
+ default void processClassDocWithDocEnv (TypeElement classDoc , ClassDocType classDocType , DocletEnvironment docEnv ) {
98
+ processClassDoc (classDoc , classDocType );
99
+ }
100
+
101
+ /**
102
+ * Process the provided methodDoc and add your custom information to the methodDocType.<br>
103
+ *
104
+ * @param methodDoc the {@link ExecutableElement} representing the docs of your method.
105
+ * @param methodDocType the related {@link MethodDocType} that will later be processed by the
106
+ * {@link org.glassfish.jersey.server.wadl.WadlGenerator}s.
107
+ * @param docEnv the doclet environment used to extract info from methodDoc
108
+ */
109
+ default void processMethodDocWithDocEnv (ExecutableElement methodDoc , MethodDocType methodDocType , DocletEnvironment docEnv ) {
110
+ processMethodDoc (methodDoc , methodDocType );
111
+ }
112
+
113
+ /**
114
+ * Use this method to extend the provided {@link ParamDocType} with the information from the
115
+ * given {@link VariableElement}.
116
+ *
117
+ * @param parameter the parameter (that is documented or not)
118
+ * @param paramDocType the {@link ParamDocType} to extend. This will later be processed by the
119
+ * {@link org.glassfish.jersey.server.wadl.WadlGenerator}s.
120
+ * @param docEnv the Doclet Environment used to extract info from parameter
121
+ */
122
+ default void processParamTagWithDocEnv (VariableElement parameter , ParamDocType paramDocType , DocletEnvironment docEnv ) {
123
+ processParamTag (parameter , paramDocType );
124
+ }
125
+
84
126
}
0 commit comments