MOV -
17.
Category:1978 films
Category:1960s spy films
Category:Cold War spy films
Category:Films about fictional Presidents of the United States
Category:Films about intelligence agencies
Category:Films based on British novels
Category:Films based on works by Len Deighton
Category:Films set in Washington, D.C.
Category:Films set in the White House
Category:Films set in the 1970s
Category:Films set in Berlin
Category:Films set in Los Angeles
Category:Films shot in Los Angeles
Category:Films shot in London
Category:Films with screenplays by John Hopkins
Category:Universal Pictures films
Category:Films with screenplays by Richard MaibaumQ:
Is it possible to use TypeTag instead of ClassTag?
I know that to use ClassTag I must pass a Class object. I also know that I can use a ClassTag that is typed with the class I wish to use.
But if I have a Class that is typed with a ParameterizedType and I want to use a TypeTag, is it possible?
I mean, to use a TypeTag you need the Class of the object that will be read, but if I have a ParameterizedType, the Class of the object that will be read depends on the runtime type.
I do not need that, but if I use TypeTag, I cannot know the class.
EDIT
I'm using Scala 2.10 and REPL
EDIT2
I try it with a class object. That can be any object like a String, an Integer, a Double,... (in REPL I try it with a Double, a String,...)
object Foo {
def method(a:Any): Any = {
println(a)
a
}
}
I define a class and I try to read with a TypeTag:
class FooTag[T
Related links:
Comments