implements PR022
This commit is contained in:
+2
@@ -13,4 +13,6 @@ public final class ProjectDescriptor {
|
||||
private final String name; // project name
|
||||
private final String version; // project version
|
||||
private final ReadOnlyList<Path> sourceRoots; // source roots canon paths for the project
|
||||
@Builder.Default
|
||||
private final SourceKind sourceKind = SourceKind.PROJECT;
|
||||
}
|
||||
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package p.studio.compiler.models;
|
||||
|
||||
public enum SourceKind {
|
||||
PROJECT,
|
||||
SDK_INTERFACE
|
||||
}
|
||||
|
||||
+4
@@ -1,6 +1,7 @@
|
||||
package p.studio.compiler.source.tables;
|
||||
|
||||
import p.studio.compiler.models.ProjectDescriptor;
|
||||
import p.studio.compiler.models.SourceKind;
|
||||
import p.studio.compiler.source.identifiers.ProjectId;
|
||||
|
||||
import java.nio.file.Path;
|
||||
@@ -9,4 +10,7 @@ import java.util.Optional;
|
||||
public interface ProjectTableReader extends DenseTableReader<ProjectId, ProjectDescriptor> {
|
||||
Optional<ProjectDescriptor> optional(Path pathCanon);
|
||||
Optional<ProjectId> optionalId(Path pathCanon);
|
||||
default SourceKind sourceKind(final ProjectId projectId) {
|
||||
return get(projectId).getSourceKind();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user