Skip to content
This repository has been archived by the owner on Mar 26, 2020. It is now read-only.

Change djinni's generated Java files to use interfaces #406

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/source/JNIMarshal.scala
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ class JNIMarshal(spec: Spec) extends Marshal(spec) {
case MOptional => throw new AssertionError("nested optional?")
case m => javaTypeSignature(tm.args.head)
}
case MList => "Ljava/util/ArrayList;"
case MSet => "Ljava/util/HashSet;"
case MMap => "Ljava/util/HashMap;"
case MList => "Ljava/util/List;"
case MSet => "Ljava/util/Set;"
case MMap => "Ljava/util/Map;"
}
case e: MExtern => e.jni.typeSignature
case MParam(_) => "Ljava/lang/Object;"
Expand Down
12 changes: 6 additions & 6 deletions src/source/JavaMarshal.scala
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ class JavaMarshal(spec: Spec) extends Marshal(spec) {
def references(m: Meta): Seq[SymbolReference] = m match {
case o: MOpaque =>
o match {
case MList => List(ImportRef("java.util.ArrayList"))
case MSet => List(ImportRef("java.util.HashSet"))
case MMap => List(ImportRef("java.util.HashMap"))
case MList => List(ImportRef("java.util.List"))
case MSet => List(ImportRef("java.util.Set"))
case MMap => List(ImportRef("java.util.Map"))
case MDate => List(ImportRef("java.util.Date"))
case _ => List()
}
Expand Down Expand Up @@ -103,9 +103,9 @@ class JavaMarshal(spec: Spec) extends Marshal(spec) {
case MDate => "Date"
case MBinary => "byte[]"
case MOptional => throw new AssertionError("optional should have been special cased")
case MList => "ArrayList"
case MSet => "HashSet"
case MMap => "HashMap"
case MList => "List"
case MSet => "Set"
case MMap => "Map"
case d: MDef => withPackage(packageName, idJava.ty(d.name))
case e: MExtern => throw new AssertionError("unreachable")
case p: MParam => idJava.typeParam(p.name)
Expand Down