|
|
@ -1,5 +1,5 @@ |
|
|
|
/* |
|
|
|
/* |
|
|
|
* Copyright 2002-2022 the original author or authors. |
|
|
|
* Copyright 2002-2023 the original author or authors. |
|
|
|
* |
|
|
|
* |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
@ -25,7 +25,8 @@ import javax.lang.model.element.ElementKind; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* A {@link StereotypesProvider} that extracts a stereotype for each |
|
|
|
* A {@link StereotypesProvider} that extracts a stereotype for each |
|
|
|
* {@code jakarta.*} annotation <i>present</i> on a class or interface. |
|
|
|
* {@code jakarta.*} or {@code javax.*} annotation <i>present</i> on a class or |
|
|
|
|
|
|
|
* interface. |
|
|
|
* |
|
|
|
* |
|
|
|
* @author Stephane Nicoll |
|
|
|
* @author Stephane Nicoll |
|
|
|
* @since 5.0 |
|
|
|
* @since 5.0 |
|
|
@ -49,7 +50,7 @@ class StandardStereotypesProvider implements StereotypesProvider { |
|
|
|
} |
|
|
|
} |
|
|
|
for (AnnotationMirror annotation : this.typeHelper.getAllAnnotationMirrors(element)) { |
|
|
|
for (AnnotationMirror annotation : this.typeHelper.getAllAnnotationMirrors(element)) { |
|
|
|
String type = this.typeHelper.getType(annotation); |
|
|
|
String type = this.typeHelper.getType(annotation); |
|
|
|
if (type.startsWith("jakarta.")) { |
|
|
|
if (type.startsWith("jakarta.") || type.startsWith("javax.")) { |
|
|
|
stereotypes.add(type); |
|
|
|
stereotypes.add(type); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|