Class ResourceLocation


  • public class ResourceLocation
    extends java.lang.Object
    • Field Detail

      • resourceClass

        @NotNull
        private final @NotNull java.lang.Class<?> resourceClass
      • resourcePath

        @NotNull
        private final @NotNull java.lang.String resourcePath
      • fileUrl

        @NotNull
        private final @NotNull java.lang.String fileUrl
      • resolvedResourcePath

        @NotNull
        private final @NotNull java.lang.String resolvedResourcePath
    • Constructor Detail

      • ResourceLocation

        public ResourceLocation​(@NotNull
                                @NotNull java.lang.Class<?> resourceClass,
                                @NotNull
                                @NotNull java.lang.String resourcePath,
                                @NotNull
                                @NotNull java.lang.String fileUrl)
      • ResourceLocation

        private ResourceLocation​(@NotNull
                                 @NotNull java.lang.Class<?> resourceClass,
                                 @NotNull
                                 @NotNull java.lang.String resourcePath,
                                 @NotNull
                                 @NotNull java.lang.String fileUrl,
                                 @NotNull
                                 @NotNull java.lang.String resolvedResourcePath)
    • Method Detail

      • getResourceClass

        @NotNull
        public @NotNull java.lang.Class<?> getResourceClass()
      • getResourcePath

        @NotNull
        public @NotNull java.lang.String getResourcePath()
      • getFileUrl

        @NotNull
        public @NotNull java.lang.String getFileUrl()
      • getFileDirectoryUrl

        @NotNull
        public @NotNull java.lang.String getFileDirectoryUrl()
      • getFileUrl

        @NotNull
        public @NotNull java.lang.String getFileUrl​(int lineNumber)
      • getResolvedResourcePath

        @NotNull
        public @NotNull java.lang.String getResolvedResourcePath()
      • isNull

        public boolean isNull()
      • getResourceInputStream

        @NotNull
        public @NotNull java.io.InputStream getResourceInputStream()
      • getResourceText

        @NotNull
        public @NotNull java.lang.String getResourceText()
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • withResourceClass

        @NotNull
        public @NotNull ResourceLocation withResourceClass​(@NotNull
                                                           @NotNull java.lang.Class<?> resourceClass)
      • withResourcePath

        @NotNull
        public @NotNull ResourceLocation withResourcePath​(@NotNull
                                                          @NotNull java.lang.String resourcePath)
      • withFileUrl

        @NotNull
        public @NotNull ResourceLocation withFileUrl​(@NotNull
                                                     @NotNull java.lang.String fileUrl)
      • withResolvedResourcePath

        @NotNull
        public @NotNull ResourceLocation withResolvedResourcePath​(@NotNull
                                                                  @NotNull java.lang.String resolvedResourcePath)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • of

        @NotNull
        public static @NotNull ResourceLocation of​(@NotNull
                                                   @NotNull java.lang.String resourcePath)
      • of

        @NotNull
        public static @NotNull ResourceLocation of​(@NotNull
                                                   @NotNull java.lang.Class<?> resourceClass,
                                                   @NotNull
                                                   @NotNull java.lang.String resourcePath)
      • of

        @NotNull
        public static @NotNull ResourceLocation of​(@NotNull
                                                   @NotNull java.lang.Class<?> resourceClass,
                                                   @NotNull
                                                   @NotNull java.lang.String resourcePath,
                                                   @NotNull
                                                   @NotNull java.lang.String fileUrl)
      • getResourceText

        @NotNull
        public static @NotNull java.lang.String getResourceText​(@NotNull
                                                                @NotNull ResourceLocation location)
      • getResourceInputStream

        @NotNull
        public static @NotNull java.io.InputStream getResourceInputStream​(@NotNull
                                                                          @NotNull ResourceLocation location)