Skip to content

Commit

Permalink
don't generate Properties.scala - PropertyKeys are old school
Browse files Browse the repository at this point in the history
  • Loading branch information
mpollmeier committed Oct 20, 2023
1 parent 1126110 commit 7b02026
Show file tree
Hide file tree
Showing 11 changed files with 10 additions and 372 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -765,11 +765,8 @@ class DomainClassesGenerator(schema: Schema) {
|""".stripMargin
val file = outputDir/s"$className.java"
os.write(file,
s"""package ${schema.basePackage};
s"""package ${schema.basePackage}.v2;
|
|import overflowdb.*;
|
|import java.util.Collection;
|import java.util.HashSet;
|import java.util.Set;
|
Expand Down Expand Up @@ -797,21 +794,6 @@ class DomainClassesGenerator(schema: Schema) {
})
}

writeConstantsFile("Properties", schema.properties.map { property =>
val src = {
val valueType = typeFor(property)
val cardinality = property.cardinality
import Property.Cardinality
val completeType = cardinality match {
case Cardinality.One(_) => valueType
case Cardinality.ZeroOrOne => valueType
case Cardinality.List => s"scala.collection.IndexedSeq<$valueType>"
}
s"""public static final overflowdb.PropertyKey<$completeType> ${property.name} = new overflowdb.PropertyKey<>("${property.name}");"""
}
ConstantContext(property.name, src, property.comment)
})

results.result()
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package io.shiftleft.codepropertygraph.generated;
package io.shiftleft.codepropertygraph.generated.v2;

import overflowdb.*;

import java.util.Collection;
import java.util.HashSet;
import java.util.Set;

Expand Down
5 changes: 1 addition & 4 deletions joern-generated/src/main/scala/generated/DispatchTypes.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package io.shiftleft.codepropertygraph.generated;
package io.shiftleft.codepropertygraph.generated.v2;

import overflowdb.*;

import java.util.Collection;
import java.util.HashSet;
import java.util.Set;

Expand Down
5 changes: 1 addition & 4 deletions joern-generated/src/main/scala/generated/EdgeTypes.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package io.shiftleft.codepropertygraph.generated;
package io.shiftleft.codepropertygraph.generated.v2;

import overflowdb.*;

import java.util.Collection;
import java.util.HashSet;
import java.util.Set;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package io.shiftleft.codepropertygraph.generated;
package io.shiftleft.codepropertygraph.generated.v2;

import overflowdb.*;

import java.util.Collection;
import java.util.HashSet;
import java.util.Set;

Expand Down
5 changes: 1 addition & 4 deletions joern-generated/src/main/scala/generated/Languages.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package io.shiftleft.codepropertygraph.generated;
package io.shiftleft.codepropertygraph.generated.v2;

import overflowdb.*;

import java.util.Collection;
import java.util.HashSet;
import java.util.Set;

Expand Down
5 changes: 1 addition & 4 deletions joern-generated/src/main/scala/generated/ModifierTypes.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package io.shiftleft.codepropertygraph.generated;
package io.shiftleft.codepropertygraph.generated.v2;

import overflowdb.*;

import java.util.Collection;
import java.util.HashSet;
import java.util.Set;

Expand Down
5 changes: 1 addition & 4 deletions joern-generated/src/main/scala/generated/NodeTypes.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package io.shiftleft.codepropertygraph.generated;
package io.shiftleft.codepropertygraph.generated.v2;

import overflowdb.*;

import java.util.Collection;
import java.util.HashSet;
import java.util.Set;

Expand Down
5 changes: 1 addition & 4 deletions joern-generated/src/main/scala/generated/Operators.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package io.shiftleft.codepropertygraph.generated;
package io.shiftleft.codepropertygraph.generated.v2;

import overflowdb.*;

import java.util.Collection;
import java.util.HashSet;
import java.util.Set;

Expand Down
317 changes: 0 additions & 317 deletions joern-generated/src/main/scala/generated/Properties.java

This file was deleted.

5 changes: 1 addition & 4 deletions joern-generated/src/main/scala/generated/PropertyNames.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package io.shiftleft.codepropertygraph.generated;
package io.shiftleft.codepropertygraph.generated.v2;

import overflowdb.*;

import java.util.Collection;
import java.util.HashSet;
import java.util.Set;

Expand Down

0 comments on commit 7b02026

Please sign in to comment.