Skip to content

Commit

Permalink
Fix checkstyle errors
Browse files Browse the repository at this point in the history
Signed-off-by: Gyúróczki Gergő <gergonoorbi@gmail.com>
  • Loading branch information
Degubi committed Oct 27, 2019
1 parent 1f51d88 commit 6489790
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,21 @@

import java.lang.annotation.Annotation;
import java.lang.reflect.AnnotatedElement;

import java.util.Map;
import java.util.HashMap;
import java.util.Map;

import javax.json.bind.JsonbException;

import org.eclipse.yasson.internal.properties.Messages;
import org.eclipse.yasson.internal.properties.MessageKeys;
import org.eclipse.yasson.internal.properties.Messages;

/**
* Annotation holder for fields, getters and setters.
*
* @param <T> annotated element
*/
public class JsonbAnnotatedElement<T extends AnnotatedElement> {

private final Map<Class<? extends Annotation>, Annotation> annotations;

private final T element;
Expand Down Expand Up @@ -59,7 +58,13 @@ public T getElement() {
return element;
}

public <T extends Annotation> T getAnnotation(Class<T> annotationClass) {
/**
* Get an annotation by type.
* @param <AT> Type of annotation
* @param annotationClass Type of annotation
* @return Annotation by passed type
*/
public <AT extends Annotation> AT getAnnotation(Class<AT> annotationClass) {
return annotationClass.cast(annotations.get(annotationClass));
}

Expand Down

0 comments on commit 6489790

Please sign in to comment.