public static void handleMethods(DeploymentDescriptorEnvironment env, EEModuleDescription eeModuleDescription, String defaultClassName) throws DeploymentUnitProcessingException {
final RemoteEnvironment environment = env.getEnvironment();
// post-construct(s) of the interceptor configured (if any) in the deployment descriptor
LifecycleCallbacksMetaData postConstructs = environment.getPostConstructs();
if (postConstructs != null) {
for (LifecycleCallbackMetaData postConstruct : postConstructs) {
String className = postConstruct.getClassName();
if (className == null || className.isEmpty()) {
if (defaultClassName == null) {
continue;
} else {
className = defaultClassName;
}
}
final InterceptorClassDescription.Builder builder = InterceptorClassDescription.builder();
String methodName = postConstruct.getMethodName();
MethodIdentifier methodIdentifier = MethodIdentifier.getIdentifier(void.class, methodName);
builder.setPostConstruct(methodIdentifier);
eeModuleDescription.addInterceptorMethodOverride(className, builder.build());
}
}
// pre-destroy(s) of the interceptor configured (if any) in the deployment descriptor
LifecycleCallbacksMetaData preDestroys = environment.getPreDestroys();
if (preDestroys != null) {
for (LifecycleCallbackMetaData preDestroy : preDestroys) {
String className = preDestroy.getClassName();
if (className == null || className.isEmpty()) {
if (defaultClassName == null) {