private static InterceptorList ofList(final ArrayList<EJBClientInterceptorInformation> value) { if (value.isEmpty()) { return EMPTY; } else if (value.size() == 1) { return value.get(0).getSingletonList(); } else { return new InterceptorList(value.toArray(EJBClientInterceptorInformation.NO_INTERCEPTORS)); } }
this.globalInterceptors = first.getSingletonList();
private EJBClientContext.InterceptorList getInterceptorsFromAnnotation(final ClientInterceptors classClientInterceptors) { if (classClientInterceptors != null) { final Class<?>[] interceptorClasses = classClientInterceptors.value(); final int length = interceptorClasses.length; if (length == 0) { return EJBClientContext.InterceptorList.EMPTY; } else if (length == 1) { return EJBClientInterceptorInformation.forClass(interceptorClasses[0]).getSingletonList(); } else { final EJBClientInterceptorInformation[] interceptors = new EJBClientInterceptorInformation[length]; for (int i = 0; i < length; i++) { interceptors[i] = EJBClientInterceptorInformation.forClass(interceptorClasses[i]); } return new EJBClientContext.InterceptorList(interceptors); } } else { return EJBClientContext.InterceptorList.EMPTY; } }
private static InterceptorList ofList(final ArrayList<EJBClientInterceptorInformation> value) { if (value.isEmpty()) { return EMPTY; } else if (value.size() == 1) { return value.get(0).getSingletonList(); } else { return new InterceptorList(value.toArray(EJBClientInterceptorInformation.NO_INTERCEPTORS)); } }
private static InterceptorList ofList(final ArrayList<EJBClientInterceptorInformation> value) { if (value.isEmpty()) { return EMPTY; } else if (value.size() == 1) { return value.get(0).getSingletonList(); } else { return new InterceptorList(value.toArray(EJBClientInterceptorInformation.NO_INTERCEPTORS)); } }
this.globalInterceptors = first.getSingletonList();
this.globalInterceptors = first.getSingletonList();
private EJBClientContext.InterceptorList getInterceptorsFromAnnotation(final ClientInterceptors classClientInterceptors) { if (classClientInterceptors != null) { final Class<?>[] interceptorClasses = classClientInterceptors.value(); final int length = interceptorClasses.length; if (length == 0) { return EJBClientContext.InterceptorList.EMPTY; } else if (length == 1) { return EJBClientInterceptorInformation.forClass(interceptorClasses[0]).getSingletonList(); } else { final EJBClientInterceptorInformation[] interceptors = new EJBClientInterceptorInformation[length]; for (int i = 0; i < length; i++) { interceptors[i] = EJBClientInterceptorInformation.forClass(interceptorClasses[i]); } return new EJBClientContext.InterceptorList(interceptors); } } else { return EJBClientContext.InterceptorList.EMPTY; } }
private EJBClientContext.InterceptorList getInterceptorsFromAnnotation(final ClientInterceptors classClientInterceptors) { if (classClientInterceptors != null) { final Class<?>[] interceptorClasses = classClientInterceptors.value(); final int length = interceptorClasses.length; if (length == 0) { return EJBClientContext.InterceptorList.EMPTY; } else if (length == 1) { return EJBClientInterceptorInformation.forClass(interceptorClasses[0]).getSingletonList(); } else { final EJBClientInterceptorInformation[] interceptors = new EJBClientInterceptorInformation[length]; for (int i = 0; i < length; i++) { interceptors[i] = EJBClientInterceptorInformation.forClass(interceptorClasses[i]); } return new EJBClientContext.InterceptorList(interceptors); } } else { return EJBClientContext.InterceptorList.EMPTY; } }