Class JavaUtils

java.lang.Object
org.apache.axis2.util.JavaUtils
org.apache.axis2.jaxws.utility.JavaUtils

public class JavaUtils extends org.apache.axis2.util.JavaUtils
Common Java Utilites
  • Field Summary

    Fields inherited from class org.apache.axis2.util.JavaUtils

    EMPTY_STRING_ARRAY
  • Method Summary

    Modifier and Type
    Method
    Description
    static URI
    createURI(String pathString)
    Convert a String to a URI, handling special characters in the String such as spaces.
    static Class
    getCheckedException(Throwable throwable, Method method)
    Get checked exception
    static String
    Namespace 2 Package algorithm as defined by the JAXB Specification
    static String
    getPackageFromNamespace(String namespace, boolean appendUnderscoreToKeyword)
     
    static List
     
    static String
    Get a string containing the stack of the current location
    static String
    Get a string containing the stack of the specified exception

    Methods inherited from class org.apache.axis2.util.JavaUtils

    callStackToString, capitalizeFirstChar, getObjectIdentity, getWrapperClass, getWrapperClass, hasUpperCase, indexOfIgnoreCase, isFalse, isFalse, isFalse, isFalseExplicitly, isFalseExplicitly, isFalseExplicitly, isJavaId, isJavaKeyword, isTrue, isTrue, isTrue, isTrueExplicitly, isTrueExplicitly, isTrueExplicitly, makeNonJavaKeyword, replace, split, xmlNameToJava, xmlNameToJavaIdentifier

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getPackagesFromNamespace

      public static List getPackagesFromNamespace(String namespace)
      Parameters:
      namespace -
      Returns:
      List of String containing 1 or 2 packages
    • getPackageFromNamespace

      public static String getPackageFromNamespace(String namespace)
      Namespace 2 Package algorithm as defined by the JAXB Specification
      Parameters:
      Namespace -
      Returns:
      String representing Namespace
      See Also:
    • getPackageFromNamespace

      public static String getPackageFromNamespace(String namespace, boolean appendUnderscoreToKeyword)
      Parameters:
      Namespace -
      apend - underscore to keyword
      Returns:
      String representing Namespace
    • stackToString

      public static String stackToString()
      Get a string containing the stack of the current location
      Returns:
      String
    • stackToString

      public static String stackToString(Throwable e)
      Get a string containing the stack of the specified exception
      Parameters:
      e -
      Returns:
    • getCheckedException

      public static Class getCheckedException(Throwable throwable, Method method)
      Get checked exception
      Parameters:
      throwable - Throwable
      method - Method
      Returns:
      Class of the checked exception or null
    • createURI

      public static URI createURI(String pathString)
      Convert a String to a URI, handling special characters in the String such as spaces.
      Parameters:
      pathString - The String to be converted to a URI
      Returns:
      a URI or null if the String can't be converted.