@Provides public static AnnotatedElementLoader annotatedElementLoaderProvider() { return new AnnotatedElementLoader() { @Override protected List<Class<?>> load( Class<? extends Annotation> annoClass, boolean loadNonPublic, boolean loadAbstract ) { if (annoClass == BindingType.class) { if (loadNonPublic && loadAbstract) { return C.list(PublicAnnotated.class, PrivateAnnotated.class, AbstractAnnotated.class); } if (loadNonPublic) { return C.list(PublicAnnotated.class, PrivateAnnotated.class); } if (loadAbstract) { return C.list(PublicAnnotated.class, AbstractAnnotated.class); } return C.<Class<?>>list(PublicAnnotated.class); } throw E.unsupport(); } }; }
/** * Figures out the binding from {@link BindingType} annotation. * * @return * default to {@link BindingID#SOAP11_HTTP}, if no such annotation is present. * @see #parse(String) */ public static @NotNull BindingID parse(Class<?> implClass) { BindingType bindingType = implClass.getAnnotation(BindingType.class); if (bindingType != null) { String bindingId = bindingType.value(); if (bindingId.length() > 0) { return BindingID.parse(bindingId); } } return SOAP11_HTTP; }
protected boolean isMtomEnabled(Class<?> beanClass) { BindingType bindingType = (BindingType)beanClass.getAnnotation(BindingType.class); MTOM mtom = (MTOM)beanClass.getAnnotation(MTOM.class); boolean mtomEnabled = mtom != null && mtom.enabled(); if (!mtomEnabled && bindingType != null) { String binding = bindingType.value(); mtomEnabled = binding.equals(SOAPBinding.SOAP11HTTP_MTOM_BINDING) || binding.equals(SOAPBinding.SOAP12HTTP_MTOM_BINDING); } return mtomEnabled; }
/** * This method will be used to attach @BindingType annotation data to the * <code>DescriptionBuilderComposite</code> * * @param composite - <code>DescriptionBuildercomposite</code> */ private void attachBindingTypeAnnotation(DescriptionBuilderComposite composite) { BindingType bindingType = (BindingType)ConverterUtils.getAnnotation( BindingType.class, serviceClass); if (bindingType != null) { // Attach @BindingType annotation data BindingTypeAnnot btAnnot = BindingTypeAnnot.createBindingTypeAnnotImpl(); btAnnot.setValue(bindingType.value()); composite.setBindingTypeAnnot(btAnnot); } }
@Override public String getBindingType() { final BindingType bType = getImplementorClass().getAnnotation(BindingType.class); if (bType != null) { return bType.value(); } if (this.bindingURI != null) { return this.bindingURI; } return SOAPBinding.SOAP11HTTP_BINDING; }
public static String getBindingUriFromAnn(final Class<?> clazz) { final BindingType bindingType = clazz.getAnnotation(BindingType.class); if (bindingType != null) { return bindingType.value(); } return null; }
protected String getSoapNS(Class<?> clazz) { BindingType bType = clazz.getAnnotation(BindingType.class); if (bType != null) { if (SOAPBinding.SOAP12HTTP_BINDING.equals(bType.value())) return WSDLConstants.NS_SOAP12; } return WSDLConstants.NS_SOAP11; }
public BindingType getAnnoBindingType() { if (bindingTypeAnnotation == null) { bindingTypeAnnotation = composite.getBindingTypeAnnot(); } return bindingTypeAnnotation; }
public BindingType getAnnoBindingType();