Java Web Service Class Get hasWebServiceAnnotation(Class clazz)

Here you can find the source of hasWebServiceAnnotation(Class clazz)

Description

has Web Service Annotation

License

Apache License

Declaration

private static boolean hasWebServiceAnnotation(Class<?> clazz) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import javax.jws.WebService;

public class Main {
    private static boolean hasWebServiceAnnotation(Class<?> clazz) {
        while (clazz != null) {
            if (clazz.getDeclaredAnnotation(WebService.class) != null) {
                return true;
            }/*www .j  a v  a2s.co  m*/
            for (Class<?> anInterface : clazz.getInterfaces()) {
                if (anInterface.getDeclaredAnnotation(WebService.class) != null) {
                    return true;
                }
            }
            clazz = clazz.getSuperclass();
        }
        return false;
    }
}

Related

  1. getServiceClassSource(String PackageName, String className, boolean stubs)
  2. getServiceInterface(Class clazz)
  3. getUrlPatternByWebService(Class beanClass)
  4. getWebServiceClass(Class cls)