*/
protected abstract Class getType(E element);
protected AnnotatedEJBReferenceMetaData createEJB(EJB annotation, E element)
{
AnnotatedEJBReferenceMetaData ref = new AnnotatedEJBReferenceMetaData();
if(annotation.name().length() > 0)
ref.setEjbRefName(annotation.name());
else
ref.setEjbRefName(getName(element));
if(annotation.beanInterface() != Object.class)
ref.setBeanInterface(annotation.beanInterface());
else
ref.setBeanInterface(getType(element));
if(annotation.description().length() > 0)
{
DescriptionImpl description = new DescriptionImpl();
description.setDescription(annotation.description());
DescriptionsImpl descriptions = new DescriptionsImpl();
descriptions.add(description);
ref.setDescriptions(descriptions);
}
if(annotation.beanName().length() > 0)
ref.setLink(annotation.beanName());
if(annotation.mappedName().length() > 0)
ref.setMappedName(annotation.mappedName());
String name = ProcessorUtils.getName(element);
Set<ResourceInjectionTargetMetaData> injectionTargets = ProcessorUtils.getInjectionTargets(name, element);
if(injectionTargets != null)
ref.setInjectionTargets(injectionTargets);
return ref;
}