1 22 package org.jboss.annotation.ejb; 23 24 import java.lang.annotation.Annotation ; 25 import java.util.ArrayList ; 26 import java.util.HashMap ; 27 28 import javax.ejb.ActivationConfigProperty ; 29 import javax.ejb.MessageDriven ; 30 31 35 public class DefaultActivationSpecsImpl implements DefaultActivationSpecs 36 { 37 private HashMap activationConfigProperties = new HashMap (); 38 39 public DefaultActivationSpecsImpl() 40 { 41 } 42 43 public ActivationConfigProperty [] value() 44 { 45 ActivationConfigProperty [] value = new ActivationConfigProperty [activationConfigProperties.size()]; 46 activationConfigProperties.values().toArray(value); 47 return value; 48 } 49 50 public void addActivationConfigProperty(ActivationConfigProperty property) 51 { 52 activationConfigProperties.put(property.propertyName(), property); 53 } 54 55 public void merge(DefaultActivationSpecs annotation) 56 { 57 for (ActivationConfigProperty property : annotation.value()) 58 { 59 if (!activationConfigProperties.containsKey(property.propertyName())) 60 { 61 activationConfigProperties.put(property.propertyName(), property); 62 } 63 } 64 } 65 66 public Class <? extends Annotation > annotationType() 67 { 68 return DefaultActivationSpecs.class; 69 } 70 } 71 | Popular Tags |