Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove AnnotationMember and rename AnnotationMemberValue #509

Merged
merged 2 commits into from
Jul 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package jakarta.enterprise.inject.build.compatible.spi;

import jakarta.enterprise.lang.model.AnnotationInfo;
import jakarta.enterprise.lang.model.AnnotationMemberValue;
import jakarta.enterprise.lang.model.AnnotationMember;
import jakarta.enterprise.lang.model.declarations.ClassInfo;
import jakarta.enterprise.lang.model.types.Type;

Expand Down Expand Up @@ -45,7 +45,7 @@ static AnnotationBuilder of(ClassInfo<?> annotationType) {
* @param value value of the annotation member
* @return this {@code AnnotationBuilder}
*/
default AnnotationBuilder value(AnnotationMemberValue value) {
default AnnotationBuilder value(AnnotationMember value) {
return member(AnnotationInfo.MEMBER_VALUE, value);
}

Expand Down Expand Up @@ -420,7 +420,7 @@ default AnnotationBuilder value(Annotation... values) {
* @param value value of the annotation member, must not be {@code null}
* @return this {@code AnnotationBuilder}
*/
AnnotationBuilder member(String name, AnnotationMemberValue value);
AnnotationBuilder member(String name, AnnotationMember value);

/**
* Adds a boolean-valued annotation member with given {@code name}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import java.lang.annotation.Annotation;
import java.lang.annotation.Repeatable;
import java.util.Collection;
import java.util.Map;

/**
* An annotation instance, typically obtained from an {@link AnnotationTarget}.
Expand Down Expand Up @@ -56,12 +56,12 @@ default boolean isRepeatable() {
boolean hasMember(String name);

/**
* Returns the {@link AnnotationMemberValue value} of this annotation's member with given {@code name}.
* Returns the {@link AnnotationMember value} of this annotation's member with given {@code name}.
*
* @param name member name, must not be {@code null}
* @return value of this annotation's member with given {@code name} or {@code null} if such member doesn't exist
*/
AnnotationMemberValue member(String name);
AnnotationMember member(String name);

/**
* Returns whether this annotation has the {@link #MEMBER_VALUE value} member.
Expand All @@ -73,19 +73,19 @@ default boolean hasValue() {
}

/**
* Returns the {@link AnnotationMemberValue value} of this annotation's {@link #MEMBER_VALUE value} member.
* Returns the {@link AnnotationMember value} of this annotation's {@link #MEMBER_VALUE value} member.
*
* @return value of this annotation's {@link #MEMBER_VALUE value} member or {@code null} if the member doesn't exist
*/
default AnnotationMemberValue value() {
default AnnotationMember value() {
return member(MEMBER_VALUE);
}

/**
* Returns all members of this annotation. Returns an empty collection
* if this annotation has no members.
* Returns all members of this annotation as a map, where the key is the member name
* and the value is the member value. Returns an empty map if this annotation has no members.
*
* @return an immutable collection of all members of this annotation, never {@code null}
* @return an immutable map of all members of this annotation, never {@code null}
*/
Collection<AnnotationMember> members();
Map<String, AnnotationMember> members();
}
Loading