Skip to content

Commit

Permalink
fix javadoc warnings in CDI Language Model API
Browse files Browse the repository at this point in the history
  • Loading branch information
Ladicek committed Feb 27, 2024
1 parent 0dd76aa commit 4856e19
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
* <li>{@linkplain FieldInfo fields}</li>
* <li>{@linkplain MethodInfo methods}, including constructors</li>
* <li>{@linkplain ParameterInfo method parameters}, including constructor parameters</li>
* <li>{@linkplain RecordComponentInfo record components}</li>
* </ul>
*
* @since 4.0
Expand All @@ -51,12 +52,33 @@ default Type asType() {
throw new IllegalStateException("Not a type");
}

/**
* The declaration kind: package, class, method, parameter, field, record component.
*/
enum Kind {
/**
* Package
*/
PACKAGE,
/**
* Class, interface, enum, annotation, or record
*/
CLASS,
/**
* Method or constructor
*/
METHOD,
/**
* Method parameter or constructor parameter
*/
PARAMETER,
/**
* Field
*/
FIELD,
/**
* Record component
*/
RECORD_COMPONENT,
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,41 @@
* @since 4.0
*/
public interface PrimitiveType extends Type {
/**
* The primitive type kind: boolean, byte, short, int, long, float, double, char
*/
enum PrimitiveKind {
/**
* The {@code boolean} primitive type
*/
BOOLEAN,
/**
* The {@code byte} primitive type
*/
BYTE,
/**
* The {@code short} primitive type
*/
SHORT,
/**
* The {@code int} primitive type
*/
INT,
/**
* The {@code long} primitive type
*/
LONG,
/**
* The {@code float} primitive type
*/
FLOAT,
/**
* The {@code double} primitive type
*/
DOUBLE,
/**
* The {@code char} primitive type
*/
CHAR,
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,22 +68,28 @@ default Type asType() {
return this;
}

/**
* The type kind: void, primitive, class, array, parameterized type, type variable, wildcard type
*/
enum Kind {
/** E.g. when method returns {@code void}. */
/** The void pseudo-type, e.g. when method returns {@code void}. */
VOID,
/** E.g. when method returns {@code int}. */
/** A primitive type, e.g. when method returns {@code int}. */
PRIMITIVE,
/** E.g. when method returns {@code String}. */
/** A class type, e.g. when method returns {@code String}. */
CLASS,
/** E.g. when method returns {@code int[]} or {@code String[][]}. */
/** An array type, e.g. when method returns {@code int[]} or {@code String[][]}. */
ARRAY,
/** E.g. when method returns {@code List<String>}. */
/** A parameterized type, e.g. when method returns {@code List<String>}. */
PARAMETERIZED_TYPE,
/** E.g. when method returns {@code T} and {@code T} is a type parameter of the declaring class. */
/**
* A type variable, e.g. when method returns {@code T} and {@code T} is a type parameter
* of the declaring class.
*/
TYPE_VARIABLE,
/**
* E.g. when method returns {@code List<? extends Number>}. The kind of such type is {@code PARAMETERIZED_TYPE},
* but the first (and only) type argument is a {@code WILDCARD_TYPE}.
* A wildcard type, e.g. when method returns {@code List<? extends Number>}. The kind of such type
* is {@code PARAMETERIZED_TYPE}, but the first (and only) type argument is a {@code WILDCARD_TYPE}.
*/
WILDCARD_TYPE,
}
Expand Down
3 changes: 3 additions & 0 deletions lang-model/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* The {@code jakarta.cdi.lang.model} module; defines the CDI Language Model API exported packages
*/
module jakarta.cdi.lang.model {
exports jakarta.enterprise.lang.model;
exports jakarta.enterprise.lang.model.declarations;
Expand Down

0 comments on commit 4856e19

Please sign in to comment.