Skip to content
This repository has been archived by the owner on May 28, 2019. It is now read-only.

Commit

Permalink
Merge pull request #54 from buildo/53-model_extractor_cant_parse
Browse files Browse the repository at this point in the history
#53: Model extractor can't parse fully qualified types (closes #53)
  • Loading branch information
bytecodeguru authored Mar 1, 2017
2 parents 0e265b1 + d615c87 commit a9931d3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions extractor/extractors.scala
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ package object extractors {
intermediate.Type.Name(name.value)
case scala.meta.Type.Apply(name: scala.meta.Type.Name, args) =>
intermediate.Type.Apply(name.value, args.map(tpeToIntermediate))
case scala.meta.Type.Select(_, t) => tpeToIntermediate(t)
}

private[extractors] def stripCommentMarkers(s: String) =
Expand Down
2 changes: 1 addition & 1 deletion extractor/fixture/sources/models.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package models
* @param location camping location
* @param rating camping rating
*/
case class Camping(name: String, size: Int, location: CampingLocation, rating: CampingRating)
case class Camping(id: java.util.UUID, name: String, size: Int, location: CampingLocation, rating: CampingRating)

/**
* Represents a swan
Expand Down
4 changes: 4 additions & 0 deletions extractor/src/test/scala/extractors/ModelSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ class ModelSuite extends FunSuite {
CaseClass(
name = "Camping",
members = List(
CaseClass.Member(
name = "id",
tpe = Type.Name("UUID"),
desc = None),
CaseClass.Member(
name = "name",
tpe = Type.Name("String"),
Expand Down

0 comments on commit a9931d3

Please sign in to comment.