if ( tags == null ) return annotations;
for ( Iterator i = tags.iterator(); i.hasNext(); )
{
XTag tag = ( XTag ) i.next();
String tagName = tag.getName();
AnnotationTypeDeclaration decl = _annotationInterfaceParser.getAnnotationTypeDecl(tagName);
if ( decl != null )
{
AnnotationType type = new AnnotationTypeImpl( decl );
Collection attrNames = tag.getAttributeNames();
HashMap elementValues = new HashMap();
for ( Iterator j = attrNames.iterator(); j.hasNext(); )
{
String attrName = ( String ) j.next();
AnnotationTypeElementDeclaration memberDecl = decl.getMember( attrName );
SourcePositionImpl pos = SourcePositionImpl.get( tag, attrName, element );
Object val = parseValue( memberDecl, tag.getAttributeValue( attrName ), pos );
AnnotationValue value = new AnnotationValueImpl( val, pos, memberDecl );
elementValues.put( memberDecl, value );
}
AnnotationInstanceImpl ann = new AnnotationInstanceImpl( tag, element, type, elementValues );