Top "Type-erasure" questions

In Java, type erasure is the process where the compiler removes all information related to type parameters and type arguments within a class or method when a generic type is instantiated.

Type erasure techniques

(With type erasure, I mean hiding some or all of the type information regarding a class, somewhat like Boost.Any.) …

c++ type-erasure
Serializing Map<Date, String> with Jackson

I want to serialize a Map with Jackson. The Date should be serialized as a timestamp, like all my other …

generics serialization jackson type-erasure
Getting T.class despite Java's type-erasure

I'm trying to bind an interface to its implementation as read from a configuration file so that I can feed …

java generics type-erasure
Erasure elimination in scala : non-variable type argument is unchecked since it is eliminated by erasure

I've got a sequence Seq[Any] that has a variety of objects in it (like String, Integer, List[String], etc). …

scala type-erasure
Java class object from type variable

Is there a way to get Class object from the type variable in Java generic class? Something like that: public …

java generics type-erasure
Type erasure, overriding and generics

Can someone explain to me why @Override public void fooMethod(Class<?> c) doesn't override public void fooMethod(Class …

java generics overriding type-erasure
How to pattern match on generic type in Scala?

Let's suppose we have a generic class Container: case class Container[+A](value: A) We then want to pattern match …

scala pattern-matching type-erasure
Java Generics - <int> to <Integer>

In the way of learning Java Generics, I got stuck at a point. It was written "Java Generics works only …

java generics primitive-types type-erasure
Why can't you create an instance of a generic type using "new" operator?

I found a lot of posts about how to overcome this limitation, but none about why this limitation exists (except …

java generics type-erasure
Scala double definition (2 methods have the same type erasure)

I wrote this in scala and it won't compile: class TestDoubleDef{ def foo(p:List[String]) = {} def foo(p:List[…

scala compilation overloading typeclass type-erasure