private void addAnnotations(Class<? extends Annotation> annotationClass, Annotation annotation, EJBContainer container, String methodName, MethodParametersMetaData params)
{
try
{
AnnotationRepository annotations = container.getAnnotations();
if (methodName.equals("*"))
{
log.debug("adding " + annotationClass.getName() + " annotation to "
+ ejbClass.getName() + "." + methodName);
for (java.lang.reflect.Method declaredMethod : ejbClass
.getDeclaredMethods())
{
annotations.addAnnotation(declaredMethod, annotationClass,
annotation);
overrideAnnotations(container, declaredMethod, annotationClass
.getName(), annotation);
}
} else
{
if (params == null)
{
java.lang.reflect.Method[] methods = ejbClass.getMethods();
boolean foundMethod = false;
for (int methodIndex = 0; methodIndex < methods.length; ++methodIndex)
{
if (methods[methodIndex].getName().equals(methodName))
{
log.debug("adding " + annotationClass.getName()
+ " method annotation to " + methods[methodIndex]);