Class ClassUtilitiesKt

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final static <T extends Any> File source(Class<T> $self, File tempDir) Acquire the JAR-file which contains this class.
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • source

         final static <T extends Any> File source(Class<T> $self, File tempDir)

        Acquire the JAR-file which contains this class. If JAR-file is a nested JAR-file, meaning the class is inside a JAR-file inside another JAR-file, then said nested JAR-file will be extracted to the specified directory, or your systems temp-directory, and that file will be returned by this method.

        In any case the returned file will give you access to the JAR-file which contains class from which this method was called, unless the class itself is nested more than one layer deep.

        Parameters:
        tempDir - The directory to which a nested JAR-file will be extracted to.