package net.darkmist.alib.generics;

public class GenericFudge
{
	@SuppressWarnings("unchecked")
	static public <T> Class<? extends T> getClass(T obj)
	{
		return (Class<? extends T>)obj.getClass();
	}
}

@@ -34,168 +34,500 @@
 s;%0A%0A
-public class GenericFudge%0A%7B%0A%09@SuppressWarnings(%22unchecked%22)%0A%09static public %3CT%3E Class%3C? extends T%3E getClass(T obj)%0A%09%7B%0A%09%09return (Class%3C? extends T%3E)obj.getClass()
+import java.util.Map;%0A%0A/**%0A * Static methods to get around issues with generics... %0A */%0A@SuppressWarnings(%22unchecked%22)%0Apublic class GenericFudge%0A%7B%0A%09/** Only static methods. */%0A%09private GenericFudge()%0A%09%7B%0A%09%7D%0A%0A%09/**%0A%09 * Fudge the return from getClass to include the generic.%0A%09 */%0A%09static public %3CT%3E Class%3C? extends T%3E getClass(T obj)%0A%09%7B%0A%09%09return (Class%3C? extends T%3E)obj.getClass();%0A%09%7D%0A%0A%09/**%0A%09 * Fudge a ungenericified map to be one.%0A%09 */%0A%09static public %3CK,V%3E Map%3CK,V%3E map(Map map)%0A%09%7B%0A%09%09return map
 ;%0A%09%7D

Add method to allow ungenericed map to genericed map fudge