Class ClassPathUtils

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static java.lang.management.RuntimeMXBean runtimeMXBean  
    • Constructor Summary

      Constructors 
      Constructor Description
      ClassPathUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Set<java.lang.String> getBootstrapClassPaths()
      Get Bootstrap Class Paths Set
      static java.util.Set<java.lang.String> getClassPaths()
      Get classPaths
      static java.net.URL getRuntimeClassLocation​(java.lang.Class<?> type)
      Get Class Location URL from specified Class at runtime
      static java.net.URL getRuntimeClassLocation​(java.lang.String className)
      Get Class Location URL from specified class name at runtime
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • runtimeMXBean

        protected static final java.lang.management.RuntimeMXBean runtimeMXBean
    • Constructor Detail

      • ClassPathUtils

        public ClassPathUtils()
    • Method Detail

      • getBootstrapClassPaths

        @Nonnull
        public static java.util.Set<java.lang.String> getBootstrapClassPaths()
        Get Bootstrap Class Paths Set
        Returns:
        If RuntimeMXBean.isBootClassPathSupported() == false, will return empty set.
        Since:
        1.0.0
      • getClassPaths

        @Nonnull
        public static java.util.Set<java.lang.String> getClassPaths()
        Get classPaths
        Returns:
        Class Paths Set
        Since:
        1.0.0
      • getRuntimeClassLocation

        public static java.net.URL getRuntimeClassLocation​(java.lang.String className)
        Get Class Location URL from specified class name at runtime
        Parameters:
        className - class name
        Returns:
        If className associated class is loaded on Thread context ClassLoader , return class location URL, or return null
        See Also:
        getRuntimeClassLocation(Class)
      • getRuntimeClassLocation

        public static java.net.URL getRuntimeClassLocation​(java.lang.Class<?> type)
        Get Class Location URL from specified Class at runtime
        Parameters:
        type - Class
        Returns:
        If type is primitive type, array type, synthetic type or {a security manager exists and its checkPermission method doesn't allow getting the ProtectionDomain., return null