Class TextFile

  • All Implemented Interfaces:
    software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable
    Direct Known Subclasses:
    PullRequestTemplate

    @Generated(value="jsii-pacmak/1.96.0 (build 921e240)",
               date="2024-03-28T21:16:42.814Z")
    @Stability(Experimental)
    public class TextFile
    extends FileBase
    (experimental) A text file.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  TextFile.Builder
      (experimental) A fluent builder for TextFile.
      • Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

        software.amazon.jsii.JsiiObject.InitializationMode
      • Nested classes/interfaces inherited from interface software.constructs.IConstruct

        software.constructs.IConstruct.Jsii$Default
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected TextFile​(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)  
      protected TextFile​(software.amazon.jsii.JsiiObjectRef objRef)  
        TextFile​(software.constructs.IConstruct scope, String filePath)
      (experimental) Defines a text file.
        TextFile​(software.constructs.IConstruct scope, String filePath, TextFileOptions options)
      (experimental) Defines a text file.
    • Constructor Detail

      • TextFile

        protected TextFile​(software.amazon.jsii.JsiiObjectRef objRef)
      • TextFile

        protected TextFile​(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
      • TextFile

        @Stability(Experimental)
        public TextFile​(@NotNull
                        software.constructs.IConstruct scope,
                        @NotNull
                        String filePath,
                        @Nullable
                        TextFileOptions options)
        (experimental) Defines a text file.

        Parameters:
        scope - This parameter is required.
        filePath - File path. This parameter is required.
        options - Options.
      • TextFile

        @Stability(Experimental)
        public TextFile​(@NotNull
                        software.constructs.IConstruct scope,
                        @NotNull
                        String filePath)
        (experimental) Defines a text file.

        Parameters:
        scope - This parameter is required.
        filePath - File path. This parameter is required.
    • Method Detail

      • addLine

        @Stability(Experimental)
        public void addLine​(@NotNull
                            String line)
        (experimental) Adds a line to the text file.

        Parameters:
        line - the line to add (can use tokens). This parameter is required.
      • synthesizeContent

        @Stability(Experimental)
        @Nullable
        protected String synthesizeContent​(@NotNull
                                           IResolver __)
        (experimental) Implemented by derived classes and returns the contents of the file to emit.

        Specified by:
        synthesizeContent in class FileBase
        Parameters:
        _ - This parameter is required.
        Returns:
        the content to synthesize or undefined to skip the file