Class FileBase

    • Nested Class Summary

      • Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

        software.amazon.jsii.JsiiObject.InitializationMode
      • Nested classes/interfaces inherited from interface software.constructs.IConstruct

        software.constructs.IConstruct.Jsii$Default
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected FileBase​(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)  
      protected FileBase​(software.amazon.jsii.JsiiObjectRef objRef)  
      protected FileBase​(software.constructs.IConstruct scope, String filePath)  
      protected FileBase​(software.constructs.IConstruct scope, String filePath, FileBaseOptions options)  
    • 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:
        synthesize in class Component
      • 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 - Call resolver.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 is undefined, 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.