Class JSR181Helper

java.lang.Object
org.apache.axis2.jsr181.JSR181Helper

public abstract class JSR181Helper extends Object
Helper class to work with JSR 181 annotations. This class should be used to retrieve JSR 181 annotations. It avoids the direct dependency on the API, i.e. it avoids NoClassDefFoundError exceptions if the JAR is not in the classpath. This is useful because these annotations are completely optional in Axis2.
  • Field Details

    • INSTANCE

      public static final JSR181Helper INSTANCE
      The instance of this helper class. If the JSR 181 API is not available in the classpath, this will be an implementation that always returns null.
  • Constructor Details

    • JSR181Helper

      public JSR181Helper()
  • Method Details

    • getWebServiceAnnotation

      public abstract WebServiceAnnotation getWebServiceAnnotation(Class<?> clazz)
      Get the WebService annotation for a given class.
      Parameters:
      clazz - the class
      Returns:
      the WebService annotation, or null if there is no such annotation
    • getWebMethodAnnotation

      public abstract WebMethodAnnotation getWebMethodAnnotation(Method method)
      Get the WebMethod annotation for a given method.
      Parameters:
      method - the method
      Returns:
      the WebMethod annotation, or null if there is no such annotation
    • getWebParamAnnotation

      public abstract WebParamAnnotation getWebParamAnnotation(Annotation[] annotations)
      Get the WebParam annotation from a set of annotations. This method is typically used in conjunction with Method.getParameterAnnotations().
      Parameters:
      annotations - an array of annotations
      Returns:
      the WebParam annotation, or null if the array didn't contain a WebParam annotation
    • getWebResultAnnotation

      public abstract WebResultAnnotation getWebResultAnnotation(Method method)
      Get the WebResult annotation for a given method.
      Parameters:
      method - the method
      Returns:
      the WebResult annotation, or null if there is no such annotation