Package io.github.cdklabs.projen
Class TextFileOptions.Builder
- java.lang.Object
-
- io.github.cdklabs.projen.TextFileOptions.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<TextFileOptions>
- Enclosing interface:
- TextFileOptions
@Stability(Experimental) public static final class TextFileOptions.Builder extends Object implements software.amazon.jsii.Builder<TextFileOptions>
A builder forTextFileOptions
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TextFileOptionsbuild()Builds the configured instance.TextFileOptions.Buildercommitted(Boolean committed)Sets the value ofFileBaseOptions.getCommitted()TextFileOptions.BuildereditGitignore(Boolean editGitignore)Sets the value ofFileBaseOptions.getEditGitignore()TextFileOptions.Builderexecutable(Boolean executable)Sets the value ofFileBaseOptions.getExecutable()TextFileOptions.Builderlines(List<String> lines)Sets the value ofTextFileOptions.getLines()TextFileOptions.Buildermarker(Boolean marker)Sets the value ofFileBaseOptions.getMarker()TextFileOptions.Builderreadonly(Boolean readonly)Sets the value ofFileBaseOptions.getReadonly()
-
-
-
Method Detail
-
lines
@Stability(Experimental) public TextFileOptions.Builder lines(List<String> lines)
Sets the value ofTextFileOptions.getLines()- Parameters:
lines- The contents of the text file. You can useaddLine()to append lines.- Returns:
this
-
committed
@Stability(Experimental) public TextFileOptions.Builder committed(Boolean committed)
Sets the value ofFileBaseOptions.getCommitted()- Parameters:
committed- Indicates whether this file should be committed to git or ignored. By default, all generated files are committed and anti-tamper is used to protect against manual modifications.- Returns:
this
-
editGitignore
@Stability(Experimental) public TextFileOptions.Builder editGitignore(Boolean editGitignore)
Sets the value ofFileBaseOptions.getEditGitignore()- Parameters:
editGitignore- Update the project's .gitignore file.- Returns:
this
-
executable
@Stability(Experimental) public TextFileOptions.Builder executable(Boolean executable)
Sets the value ofFileBaseOptions.getExecutable()- Parameters:
executable- Whether the generated file should be marked as executable.- Returns:
this
-
marker
@Stability(Experimental) public TextFileOptions.Builder marker(Boolean marker)
Sets the value ofFileBaseOptions.getMarker()- Parameters:
marker- Adds the projen marker to the file.- Returns:
this
-
readonly
@Stability(Experimental) public TextFileOptions.Builder readonly(Boolean readonly)
Sets the value ofFileBaseOptions.getReadonly()- Parameters:
readonly- Whether the generated file should be readonly.- Returns:
this
-
build
@Stability(Experimental) public TextFileOptions build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<TextFileOptions>- Returns:
- a new instance of
TextFileOptions - Throws:
NullPointerException- if any required attribute was not provided
-
-