Package io.github.cdklabs.projen
Class SourceCode
- java.lang.Object
-
- software.amazon.jsii.JsiiObject
-
- software.constructs.Construct
-
- io.github.cdklabs.projen.Component
-
- io.github.cdklabs.projen.SourceCode
-
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.96.0 (build 921e240)", date="2024-03-28T21:16:42.804Z") @Stability(Experimental) public class SourceCode extends Component
(experimental) Represents a source file.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSourceCode.Builder(experimental) A fluent builder forSourceCode.
-
Constructor Summary
Constructors Modifier Constructor Description SourceCode(Project project, String filePath)SourceCode(Project project, String filePath, SourceCodeOptions options)protectedSourceCode(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)protectedSourceCode(software.amazon.jsii.JsiiObjectRef objRef)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()(experimental) Decreases the indentation level and closes a code block.voidclose(String code)(experimental) Decreases the indentation level and closes a code block.StringgetFilePath()StringgetMarker()voidline()(experimental) Emit a line of code.voidline(String code)(experimental) Emit a line of code.voidopen()(experimental) Opens a code block and increases the indentation level.voidopen(String code)(experimental) Opens a code block and increases the indentation level.-
Methods inherited from class io.github.cdklabs.projen.Component
getProject, isComponent, postSynthesize, preSynthesize, synthesize
-
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
-
-
-
-
Constructor Detail
-
SourceCode
protected SourceCode(software.amazon.jsii.JsiiObjectRef objRef)
-
SourceCode
protected SourceCode(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
SourceCode
@Stability(Experimental) public SourceCode(@NotNull Project project, @NotNull String filePath, @Nullable SourceCodeOptions options)- Parameters:
project- This parameter is required.filePath- This parameter is required.options-
-
-
Method Detail
-
close
@Stability(Experimental) public void close(@Nullable String code)(experimental) Decreases the indentation level and closes a code block.- Parameters:
code- The code after the block is closed (e.g.}).
-
close
@Stability(Experimental) public void close()
(experimental) Decreases the indentation level and closes a code block.
-
line
@Stability(Experimental) public void line(@Nullable String code)(experimental) Emit a line of code.- Parameters:
code- The contents, if not specified, just adds a newline.
-
line
@Stability(Experimental) public void line()
(experimental) Emit a line of code.
-
open
@Stability(Experimental) public void open(@Nullable String code)(experimental) Opens a code block and increases the indentation level.- Parameters:
code- The code before the block starts (e.g.export class {).
-
open
@Stability(Experimental) public void open()
(experimental) Opens a code block and increases the indentation level.
-
getFilePath
@Stability(Experimental) @NotNull public String getFilePath()
-
getMarker
@Stability(Experimental) @Nullable public String getMarker()
-
-