Package io.github.cdklabs.projen
Class TextFile
- java.lang.Object
-
- software.amazon.jsii.JsiiObject
-
- software.constructs.Construct
-
- io.github.cdklabs.projen.Component
-
- io.github.cdklabs.projen.FileBase
-
- io.github.cdklabs.projen.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 classTextFile.Builder(experimental) A fluent builder forTextFile.
-
Constructor Summary
Constructors Modifier Constructor Description protectedTextFile(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)protectedTextFile(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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddLine(String line)(experimental) Adds a line to the text file.protected StringsynthesizeContent(IResolver __)(experimental) Implemented by derived classes and returns the contents of the file to emit.-
Methods inherited from class io.github.cdklabs.projen.FileBase
getAbsolutePath, getChanged, getExecutable, getMarker, getPath, getReadonly, setExecutable, setReadonly, synthesize
-
Methods inherited from class io.github.cdklabs.projen.Component
getProject, isComponent, postSynthesize, preSynthesize
-
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
-
-
-
-
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:
synthesizeContentin classFileBase- Parameters:
_- This parameter is required.- Returns:
- the content to synthesize or undefined to skip the file
-
-