score:3
in your other question i said
and supplying the canbuildfrom argument from java is... technically possible, but not something you want to do.
unfortunately, for typetag
it's even less possible: unlike canbuildfrom
, they aren't supplied by a library, but built into scala compiler.
the best advice i can give is to create a scala file supplying the type tags you need to use from java, since you only should need a limited number of them:
object typetags {
val seqinteger = typetag[seq[integer]]
...
// or
val integer = typetag[integer]
def seq[a](implicit tt: typetag[a]) = typetag[seq[a]]
}
and then from java typetags.seqinteger
or typetags.seq(typetags.integer)
.
in other places spark provides special api for use from java (look for .java
packages), but i couldn't find one for functions.typedlit
.
Source: stackoverflow.com
Related Query
- How to get the TypeTag for a class in Java
- How to get the class of a trait within an object defined in scala from within a java class?
- In Scala, How to get the returned TypeTag of a class method?
- How to get the concrete class for a mixed in trait
- How to get TypeTag for generic class at runtime
- How do I get the TypeTag for an Array's element type?
- How the get the classOf for a scala object type
- How to get around the Scala case class limit of 22 fields?
- How do I declare a constructor for an 'object' class type in Scala? I.e., a one time operation for the singleton
- How do I get an instance of the type class associated with a context bound?
- How do I write a JSON Format for an object in the Java library that doesn't have an apply method?
- How to get the name of a case class field as a string/symbol at compile time using shapeless?
- How to access a Java static method from Scala given a type alias for that class it resides in
- How to get probabilities corresponding to the class from Spark ML random forest
- How do I get the scalaz IDEA live templates working for the symbolic methods?
- How to get the class of a singleton object at compile time?
- How do I create an explicit companion object for a case class which behaves identically to the replaced compiler provided implicit companion object?
- Scala spark: how to use dataset for a case class with the schema has snake_case?
- How do I get the runtime Class of a parameterized Type in a Scala trait
- scala: How to get the class in its own constructor
- Scala - how to get the 'type' for a field using reflection api
- How can I get random data generated for scala case classes with the ability to "change some values" for unit testing?
- In scala macros, how to get the complete `extends` clause for a class?
- How do I get the class of java.lang.Enum in scala?
- How do I get the current script or class name in Scala?
- In scala, how to get an array of keys and values from map, with the correct order (i-th key is for the i-th value)?
- Scala: How can I get the name of a variable class in a function?
- How do I get circe to have an either/or output scenario for the generated Json?
- How to to get an object out of a HashMap without using the Java Reflection API?
- How to get the COUNT of emails for each id in Scala
More Query from same tag
- Range Pattern using for loop
- Scala - Error type mismatch found : List[String] required: scala.collection.IterableOnce[Nothing]
- Basic repetition in scala
- org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: []
- Spark closure argument binding
- Scala pattern matching case is skipped
- Returning a partially applied function in Scala
- How to unmarshal POST params and JSON body in a single route?
- Where do the names value/expression kept in functional programs?
- Can't parse a json to a `ProvinceJson` class, with lift-json
- Scala - ordering a list
- Scala: String "+" vs "++"
- Faster write to MySQL using databricks write
- How can I get implicit conversions to work inside collections?
- Error using reactivemongo 0.12.1 with play 2.5.X
- Case Class and Implicit Arguments and Pattern Matching
- How does the Scala type checker know to prevent calling flatten on a List that is already flat
- Dependent Typing style Equality Proofs in Scala
- How to find the symmetrical duplicate columns(2 columns) using spark dataframe in scala?
- What is a "build manager" for scala in the scala ide extensions for Eclipse?
- Scala, enforce length of Array/Collection parameter
- Actor hierarchy design guidance, how and when to destroy child actors
- Lazy Cartesian product of several Seqs in Scala
- Returning all elements from a Map[List()] in Scala
- spark scala split timestamp column in date column and time column
- Gatling Scala date randomly not well formated
- auto mix api when self typing in Scala
- How to load and write properties file in a Spark Scala job?
- How to use chisel module as package
- Scala Serializing a Seq of Objects or Any