Package org.pkl.core.project
Class Project
- java.lang.Object
-
- org.pkl.core.project.Project
-
public final class Project extends java.lang.ObjectJava representation of modulepkl.Project.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classProject.EvaluatorSettings
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)DeclaredDependenciesgetDependencies()java.util.Map<java.lang.String,Project>getLocalProjectDependencies()@Nullable PackagegetPackage()java.nio.file.PathgetProjectDir()java.net.URIgetProjectFileUri()Project.EvaluatorSettingsgetSettings()java.util.List<java.nio.file.Path>getTests()inthashCode()static ProjectloadFromPath(java.nio.file.Path path)Convenience method to load a project with the default security manager, no timeout, and the default stack frame transformer.static ProjectloadFromPath(java.nio.file.Path path, SecurityManager securityManager, @Nullable java.time.Duration timeout)Convenience method to load a project with the default stack frame transformer.static ProjectloadFromPath(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 givenPath.static ProjectparseProject(PObject module)
-
-
-
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 givenPath.Evaluates a module's
output.valueto 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
-
getSettings
public Project.EvaluatorSettings getSettings()
-
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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
getDependencies
public DeclaredDependencies getDependencies()
-
getLocalProjectDependencies
public java.util.Map<java.lang.String,Project> getLocalProjectDependencies()
-
getProjectDir
public java.nio.file.Path getProjectDir()
-
-