@@ -13,27 +13,27 @@ import scala.collection.mutable
1313class Schema (val domainShortName : String ,
1414 val basePackage : String ,
1515 val additionalTraversalsPackages : Seq [String ],
16- val properties : Seq [Property [_ ]],
16+ val properties : Seq [Property [? ]],
1717 val anyNode : AnyNodeType ,
1818 val nodeBaseTypes : Seq [NodeBaseType ],
1919 val nodeTypes : Seq [NodeType ],
2020 val edgeTypes : Seq [EdgeType ],
21- val constantsByCategory : Map [String , Seq [Constant [_ ]]],
21+ val constantsByCategory : Map [String , Seq [Constant [? ]]],
2222 val protoOptions : Option [ProtoOptions ],
23- val noWarnList : Set [(AbstractNodeType , Property [_ ])]) {
23+ val noWarnList : Set [(AbstractNodeType , Property [? ])]) {
2424
2525 /** nodeTypes and nodeBaseTypes combined */
2626 lazy val allNodeTypes : Seq [AbstractNodeType ] =
2727 nodeTypes ++ nodeBaseTypes
2828
2929 /** properties that are used in node types */
30- def nodeProperties : Seq [Property [_ ]] =
30+ def nodeProperties : Seq [Property [? ]] =
3131 properties.filter(property =>
3232 (nodeTypes ++ nodeBaseTypes).exists(_.properties.contains(property))
3333 )
3434
3535 /** properties that are used in edge types */
36- def edgeProperties : Seq [Property [_ ]] =
36+ def edgeProperties : Seq [Property [? ]] =
3737 properties.filter(property =>
3838 edgeTypes.exists(_.properties.contains(property))
3939 )
@@ -58,12 +58,12 @@ abstract class AbstractNodeType(val name: String, val comment: Option[String], v
5858 def starterName (name: String ): this .type = {this ._starterName = Option (name); this }
5959 def withoutStarter (): this .type = starterName(null )
6060 /** properties (including potentially inherited properties) */
61- override def properties : Seq [Property [_ ]] = {
61+ override def properties : Seq [Property [? ]] = {
6262 val entireClassHierarchy = this +: extendzRecursively
6363 entireClassHierarchy.flatMap(_.propertiesWithoutInheritance).distinct.sortBy(_.name.toLowerCase)
6464 }
6565
66- def propertiesWithoutInheritance : Seq [Property [_ ]] =
66+ def propertiesWithoutInheritance : Seq [Property [? ]] =
6767 _properties.toSeq.sortBy(_.name.toLowerCase)
6868
6969 def extendz (additional : NodeBaseType * ): this .type = {
@@ -139,14 +139,14 @@ class NodeType(name: String, comment: Option[String], schemaInfo: SchemaInfo)
139139 extends AbstractNodeType (name, comment, schemaInfo) with HasOptionalProtoId {
140140 protected val _containedNodes : mutable.Set [ContainedNode ] = mutable.Set .empty
141141
142- private var _primaryKey : Option [Property [_ ]] = None
142+ private var _primaryKey : Option [Property [? ]] = None
143143
144- def primaryKey (p : Property [_ ]): this .type = {
144+ def primaryKey (p : Property [? ]): this .type = {
145145 this ._primaryKey = Option (p)
146146 this
147147 }
148148
149- def primaryKey : Option [Property [_ ]] = this ._primaryKey
149+ def primaryKey : Option [Property [? ]] = this ._primaryKey
150150
151151 lazy val classNameDb = s " ${className}Db "
152152
@@ -212,7 +212,7 @@ class EdgeType(val name: String, val comment: Option[String], val schemaInfo: Sc
212212 override def toString = s " EdgeType( $name) "
213213
214214 /** properties (including potentially inherited properties) */
215- def properties : Seq [Property [_ ]] =
215+ def properties : Seq [Property [? ]] =
216216 _properties.toSeq.sortBy(_.name.toLowerCase)
217217}
218218
@@ -240,7 +240,7 @@ class Property[A](val name: String,
240240 }
241241
242242 def isMandatory : Boolean =
243- cardinality.isInstanceOf [Cardinality .One [_ ]]
243+ cardinality.isInstanceOf [Cardinality .One [? ]]
244244
245245 def hasDefault : Boolean =
246246 default.isDefined
@@ -273,7 +273,7 @@ object Property {
273273 object Long extends ValueType [Long ]
274274 object Float extends ValueType [Float ]
275275 object Double extends ValueType [Double ]
276- object List extends ValueType [Seq [_ ]]
276+ object List extends ValueType [Seq [? ]]
277277 object Char extends ValueType [Char ]
278278 object NodeRef extends ValueType [Any ]
279279 object Unknown extends ValueType [Any ]
@@ -357,20 +357,20 @@ trait HasClassName {
357357}
358358
359359trait HasProperties {
360- protected val _properties : mutable.Set [Property [_ ]] = mutable.Set .empty
360+ protected val _properties : mutable.Set [Property [? ]] = mutable.Set .empty
361361
362- def addProperty (additional : Property [_ ]): this .type = {
362+ def addProperty (additional : Property [? ]): this .type = {
363363 _properties.add(additional)
364364 this
365365 }
366366
367- def addProperties (additional : Property [_ ]* ): this .type = {
367+ def addProperties (additional : Property [? ]* ): this .type = {
368368 additional.foreach(addProperty)
369369 this
370370 }
371371
372372 /** properties (including potentially inherited properties) */
373- def properties : Seq [Property [_ ]]
373+ def properties : Seq [Property [? ]]
374374}
375375
376376trait HasOptionalProtoId {
@@ -390,10 +390,10 @@ trait HasSchemaInfo {
390390
391391/** carry extra information on where a schema element is being defined, e.g. when we want to be able to
392392 * refer back that `node XYZ` was defined in `BaseSchema`, e.g. for documentation */
393- case class SchemaInfo (definedIn : Option [Class [_ ]])
393+ case class SchemaInfo (definedIn : Option [Class [? ]])
394394object SchemaInfo {
395395 val Unknown = SchemaInfo (None )
396396
397- def forClass (schemaClass : Class [_ ]): SchemaInfo =
397+ def forClass (schemaClass : Class [? ]): SchemaInfo =
398398 SchemaInfo (Option (schemaClass))
399399}
0 commit comments