List<AnnotationFS> matchedAnnotations = match.getMatchedAnnotations(indexes,
element.getContainer());
for (AnnotationFS matched : matchedAnnotations) {
if (TYPES_AT_BEGIN.equals(op)) {
RutaBasic beginAnchor = stream.getBeginAnchor(matched.getBegin());
Collection<?>[] beginMap = beginAnchor.getBeginMap();
Set<AnnotationFS> aset = new HashSet<AnnotationFS>();
for (Collection<?> set : beginMap) {
if(set != null) {
aset.addAll((Collection<? extends AnnotationFS>) set);
}
}
for (AnnotationFS annotationFS : aset) {
list.add(annotationFS.getType());
}
} else if (TYPES_AT_END.equals(op)) {
RutaBasic endAnchor = stream.getEndAnchor(matched.getEnd());
// Collection<Set<AnnotationFS>> values = endAnchor.getEndMap().values();
Collection<?>[] endMap = endAnchor.getEndMap();
Set<AnnotationFS> aset = new HashSet<AnnotationFS>();
for (Collection<?> set : endMap) {
if(set != null) {
aset.addAll((Collection<? extends AnnotationFS>) set);
}