Package io.github.cdklabs.projen
Class SampleFileOptions.Builder
- java.lang.Object
-
- io.github.cdklabs.projen.SampleFileOptions.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<SampleFileOptions>
- Enclosing interface:
- SampleFileOptions
@Stability(Experimental) public static final class SampleFileOptions.Builder extends Object implements software.amazon.jsii.Builder<SampleFileOptions>
A builder forSampleFileOptions
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SampleFileOptionsbuild()Builds the configured instance.SampleFileOptions.Buildercontents(String contents)Sets the value ofSampleFileOptions.getContents()SampleFileOptions.BuildersourcePath(String sourcePath)Sets the value ofSampleFileOptions.getSourcePath()
-
-
-
Method Detail
-
contents
@Stability(Experimental) public SampleFileOptions.Builder contents(String contents)
Sets the value ofSampleFileOptions.getContents()- Parameters:
contents- The contents of the file to write.- Returns:
this
-
sourcePath
@Stability(Experimental) public SampleFileOptions.Builder sourcePath(String sourcePath)
Sets the value ofSampleFileOptions.getSourcePath()- Parameters:
sourcePath- Absolute path to a file to copy the contents from (does not need to be a text file). If your project is Typescript-based and has configuredtestdirto be a subdirectory ofsrc, sample files should outside of thesrcdirectory, otherwise they may not be copied. For example:new SampleFile(this, 'assets/icon.png', { source: path.join(__dirname, '..', 'sample-assets', 'icon.png') });- Returns:
this
-
build
@Stability(Experimental) public SampleFileOptions build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<SampleFileOptions>- Returns:
- a new instance of
SampleFileOptions - Throws:
NullPointerException- if any required attribute was not provided
-
-