1 25 26 package org.objectweb.easybeans.deployment.annotations.analyzer.classes; 27 28 import java.util.ArrayList ; 29 import java.util.List ; 30 31 import org.objectweb.easybeans.deployment.annotations.analyzer.AnnotationType; 32 import org.objectweb.easybeans.deployment.annotations.analyzer.ObjectArrayAnnotationVisitor; 33 import org.objectweb.easybeans.deployment.annotations.metadata.ClassAnnotationMetadata; 34 35 40 public class JavaxAnnotationSecurityDeclareRolesVisitor extends ObjectArrayAnnotationVisitor<ClassAnnotationMetadata, String > 41 implements AnnotationType { 42 43 46 public static final String TYPE = "Ljavax/annotation/security/DeclareRoles;"; 47 48 52 public JavaxAnnotationSecurityDeclareRolesVisitor(final ClassAnnotationMetadata classAnnotationMetadata) { 53 super(classAnnotationMetadata); 54 } 55 56 60 @Override 61 public void visitEnd() { 62 List <String > declareRoles = new ArrayList <String >(); 63 for (String s : getArrayObjects()) { 64 declareRoles.add(s); 65 } 66 getAnnotationMetadata().setDeclareRoles(declareRoles); 67 } 68 69 72 public String getType() { 73 return TYPE; 74 } 75 76 } 77 | Popular Tags |