Here you can find the source of getAnnotations(Annotation[][] annotations)
static List<Annotation> getAnnotations(Annotation[][] annotations)
//package com.java2s; //License from project: Apache License import java.lang.annotation.Annotation; import java.util.LinkedList; import java.util.List; public class Main { static List<Annotation> getAnnotations(Annotation[][] annotations) { final List<Annotation> result = new LinkedList<>(); for (int i = 0; i < annotations.length; i++) { if (annotations[i].length > 1) { throw new RuntimeException("you can only assign one annotation"); }//from w w w . j av a 2 s . c o m Annotation annotation = annotations[i][0]; result.add(annotation); } return result; } }