addInjector(container, method, method.getDeclaringClass(), jndiInjector);
}
else if(annotatedElement instanceof Field)
{
Field field = (Field) annotatedElement;
jndiInjector = new JndiFieldInjector(field, encName, container.getEnc());
addInjector(container, field, field.getDeclaringClass(), jndiInjector);
}
else
throw new IllegalStateException("Annotated element for '" + encName + "' is niether Method nor Field: " + annotatedElement);
}