1 25 26 package org.objectweb.easybeans.deployment.annotations.analyzer.classes; 27 28 import org.objectweb.easybeans.deployment.annotations.analyzer.AbsAnnotationVisitor; 29 import org.objectweb.easybeans.deployment.annotations.impl.JCommonBean; 30 import org.objectweb.easybeans.deployment.annotations.metadata.ClassAnnotationMetadata; 31 36 public abstract class AbsCommonEjbVisitor<T extends JCommonBean> extends AbsAnnotationVisitor<ClassAnnotationMetadata> { 37 38 41 private static final String NAME = "name"; 42 43 46 private static final String MAPPED_NAME = "mappedName"; 47 48 51 private static final String DESCRIPTION = "description"; 52 53 57 public AbsCommonEjbVisitor(final ClassAnnotationMetadata classAnnotationMetadata) { 58 super(classAnnotationMetadata); 59 } 60 61 69 @Override 70 public void visit(final String name, final Object value) { 71 if (name.equals(NAME)) { 72 getJCommonBean().setName((String ) value); 73 } else if (name.equals(MAPPED_NAME)) { 74 getJCommonBean().setMappedName((String ) value); 75 } else if (name.equals(DESCRIPTION)) { 76 getJCommonBean().setDescription((String ) value); 77 } 78 } 79 80 83 @Override 84 public void visitEnd() { 85 getAnnotationMetadata().setJCommonBean(getJCommonBean()); 86 } 87 88 91 public abstract T getJCommonBean(); 92 93 94 } 95 | Popular Tags |