private void processLifeCycle(final EEModuleDescription eeModuleDescription, final AnnotationTarget target, final DotName annotationType, final EEApplicationClasses applicationClasses) throws DeploymentUnitProcessingException {
if (!(target instanceof MethodInfo)) {
throw MESSAGES.methodOnlyAnnotation(annotationType);
}
final MethodInfo methodInfo = MethodInfo.class.cast(target);
final ClassInfo classInfo = methodInfo.declaringClass();
final EEModuleClassDescription classDescription = eeModuleDescription.addOrGetLocalClassDescription(classInfo.name().toString());
final Type[] args = methodInfo.args();
if (args.length > 1) {
ROOT_LOGGER.warn(MESSAGES.invalidNumberOfArguments(methodInfo.name(), annotationType, classInfo.name()));
return;
} else if (args.length == 1 && !args[0].name().toString().equals(InvocationContext.class.getName())) {
ROOT_LOGGER.warn(MESSAGES.invalidSignature(methodInfo.name(), annotationType, classInfo.name(), "void methodName(InvocationContext ctx)"));
return;
}
final MethodIdentifier methodIdentifier;
if (args.length == 0) {
methodIdentifier = MethodIdentifier.getIdentifier(Void.TYPE, methodInfo.name());
} else {
methodIdentifier = MethodIdentifier.getIdentifier(Void.TYPE, methodInfo.name(), InvocationContext.class);
}
final InterceptorClassDescription.Builder builder = InterceptorClassDescription.builder(classDescription.getInterceptorClassDescription());
if (annotationType == POST_CONSTRUCT_ANNOTATION) {
builder.setPostConstruct(methodIdentifier);
} else {