private boolean checkAnnotation(Class actionBeanClass, boolean found, Method method)
{
if (found)
{
throw new ApplicationConfigurationException(InitMethod.class.getSimpleName()
+ " annotation used more than once in the same class " + actionBeanClass);
}
final Class<?>[] parameterTypes = method.getParameterTypes();
if (parameterTypes != null && parameterTypes.length > 0)
{
throw new ApplicationConfigurationException(InitMethod.class.getSimpleName()
+ " annotation used with method " + method + " cannot have parameters");
}
final Class<?> returnType = method.getReturnType();
if (returnType != null && !returnType.equals(Void.TYPE))
{
throw new ApplicationConfigurationException(InitMethod.class.getSimpleName()
+ " annotation used with method " + method + " cannot have a return type");
}
found = true;
return found;