Package io.github.cdklabs.projen
Class FileBase
- java.lang.Object
-
- software.amazon.jsii.JsiiObject
-
- software.constructs.Construct
-
- io.github.cdklabs.projen.Component
-
- io.github.cdklabs.projen.FileBase
-
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
- Direct Known Subclasses:
GitAttributesFile,IgnoreFile,License,Makefile,ObjectFile,ReactTypeDef,RequirementsFile,SetupPy,TextFile
@Generated(value="jsii-pacmak/1.96.0 (build 921e240)", date="2024-03-28T21:16:42.750Z") @Stability(Experimental) public abstract class FileBase extends Component
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedFileBase(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)protectedFileBase(software.amazon.jsii.JsiiObjectRef objRef)protectedFileBase(software.constructs.IConstruct scope, String filePath)protectedFileBase(software.constructs.IConstruct scope, String filePath, FileBaseOptions options)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description StringgetAbsolutePath()(experimental) The absolute path of this file.BooleangetChanged()(experimental) Indicates if the file has been changed during synthesis.BooleangetExecutable()(experimental) Indicates if the file should be marked as executable.StringgetMarker()(experimental) The projen marker, used to identify files as projen-generated.StringgetPath()(experimental) The file path, relative to the project's outdir.BooleangetReadonly()(experimental) Indicates if the file should be read-only or read-write.voidsetExecutable(Boolean value)(experimental) Indicates if the file should be marked as executable.voidsetReadonly(Boolean value)(experimental) Indicates if the file should be read-only or read-write.voidsynthesize()(experimental) Writes the file to the project's output directory.protected abstract StringsynthesizeContent(IResolver resolver)(experimental) Implemented by derived classes and returns the contents of the file to emit.-
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
-
FileBase
protected FileBase(software.amazon.jsii.JsiiObjectRef objRef)
-
FileBase
protected FileBase(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
FileBase
@Stability(Experimental) protected FileBase(@NotNull software.constructs.IConstruct scope, @NotNull String filePath, @Nullable FileBaseOptions options)- Parameters:
scope- This parameter is required.filePath- This parameter is required.options-
-
FileBase
@Stability(Experimental) protected FileBase(@NotNull software.constructs.IConstruct scope, @NotNull String filePath)- Parameters:
scope- This parameter is required.filePath- This parameter is required.
-
-
Method Detail
-
synthesize
@Stability(Experimental) public void synthesize()
(experimental) Writes the file to the project's output directory.- Overrides:
synthesizein classComponent
-
synthesizeContent
@Stability(Experimental) @Nullable protected abstract String synthesizeContent(@NotNull IResolver resolver)
(experimental) Implemented by derived classes and returns the contents of the file to emit.- Parameters:
resolver- Callresolver.resolve(obj)on any objects in order to resolve token functions. This parameter is required.- Returns:
- the content to synthesize or undefined to skip the file
-
getAbsolutePath
@Stability(Experimental) @NotNull public String getAbsolutePath()
(experimental) The absolute path of this file.
-
getPath
@Stability(Experimental) @NotNull public String getPath()
(experimental) The file path, relative to the project's outdir.
-
getChanged
@Stability(Experimental) @Nullable public Boolean getChanged()
(experimental) Indicates if the file has been changed during synthesis.This property is only available in
postSynthesize()hooks. If this isundefined, the file has not been synthesized yet.
-
getMarker
@Stability(Experimental) @Nullable public String getMarker()
(experimental) The projen marker, used to identify files as projen-generated.Value is undefined if the project is being ejected.
-
getExecutable
@Stability(Experimental) @NotNull public Boolean getExecutable()
(experimental) Indicates if the file should be marked as executable.
-
setExecutable
@Stability(Experimental) public void setExecutable(@NotNull Boolean value)(experimental) Indicates if the file should be marked as executable.
-
getReadonly
@Stability(Experimental) @NotNull public Boolean getReadonly()
(experimental) Indicates if the file should be read-only or read-write.
-
setReadonly
@Stability(Experimental) public void setReadonly(@NotNull Boolean value)(experimental) Indicates if the file should be read-only or read-write.
-
-