Class Project


  • public final class Project
    extends java.lang.Object
    Java representation of module pkl.Project.
    • Method Detail

      • loadFromPath

        public static Project loadFromPath​(java.nio.file.Path path,
                                           SecurityManager securityManager,
                                           @Nullable java.time.Duration timeout,
                                           StackFrameTransformer stackFrameTransformer,
                                           java.util.Map<java.lang.String,​java.lang.String> envVars)
        Loads Project data from the given Path.

        Evaluates a module's output.value to allow for embedding a project within a template.

        Throws:
        PklException - if an error occured while evaluating the project file.
      • loadFromPath

        public static Project loadFromPath​(java.nio.file.Path path,
                                           SecurityManager securityManager,
                                           @Nullable java.time.Duration timeout)
        Convenience method to load a project with the default stack frame transformer.
      • loadFromPath

        public static Project loadFromPath​(java.nio.file.Path path)
        Convenience method to load a project with the default security manager, no timeout, and the default stack frame transformer.
      • parseProject

        public static Project parseProject​(PObject module)
                                    throws java.net.URISyntaxException
        Throws:
        java.net.URISyntaxException
      • getProjectFileUri

        public java.net.URI getProjectFileUri()
      • getTests

        public java.util.List<java.nio.file.Path> getTests()
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getLocalProjectDependencies

        public java.util.Map<java.lang.String,​Project> getLocalProjectDependencies()
      • getProjectDir

        public java.nio.file.Path getProjectDir()