Class GosuSourceExtensions


  • public final class GosuSourceExtensions
    extends java.lang.Object
    Canonical list of Gosu source file extensions for use within the Gradle plugin.

    Mirrors gw.lang.reflect.gs.GosuClassTypeLoader.ALL_EXTS in gosu-core-api, which is the authoritative source of truth. A direct reference is not possible here because gosu-core-api is not on the Gradle daemon classpath at task-execution time. Keep this constant in sync with that field when new extensions are added to Gosu.

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean isGosuSourceFile​(java.lang.String filename)
      Checks the filename against a list of all known Gosu file extensions
      static java.lang.String stripExtension​(java.lang.String fqcnWithExtension)
      Strips the Gosu file extension from a dot-separated path string used when computing FQCNs.
      • Methods inherited from class java.lang.Object

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

      • isGosuSourceFile

        public static boolean isGosuSourceFile​(java.lang.String filename)
        Checks the filename against a list of all known Gosu file extensions
        Returns:
        true if the given filename ends with any Gosu source extension.
      • stripExtension

        public static java.lang.String stripExtension​(java.lang.String fqcnWithExtension)
        Strips the Gosu file extension from a dot-separated path string used when computing FQCNs. For example, "com.example.MyRule.gr" becomes "com.example.MyRule".
        Returns:
        the input less its Gosu file extension; otherwise return input unchanged if it does not end with a known Gosu extension.