Class DynamicFile

java.lang.Object
org.springframework.aot.test.generate.file.DynamicFile
Direct Known Subclasses:
ResourceFile, SourceFile

public abstract sealed class DynamicFile extends Object permits SourceFile, ResourceFile
Abstract base class for dynamically generated files.
Since:
6.0
Author:
Phillip Webb
See Also:
  • Constructor Details

    • DynamicFile

      protected DynamicFile(String path, String content)
  • Method Details

    • toString

      protected static String toString(WritableContent writableContent)
    • getContent

      public String getContent()
      Return the contents of the file.
      Returns:
      the file contents
    • getPath

      public String getPath()
      Return the relative path of the file.
      Returns:
      the file path
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object