Generics

Josh Bloch Generics JavaOne 2006
  • Builder pattern / Static Factories
  • klass.cast(...)
  • Sparse Array
  • Serialization Proxy
  • Use private and final unless reason not
Generics Considered Harmful
Generics vs. Autocasting
Explicitly provide type by passing in class, see bottom of page
method generics


public abstract void getAndParse(T paramAnotherClass);

public void addFriend(String name, Class type, T animal);
 

Comments

Popular posts from this blog

Sites, Newsletters, and Blogs

Oracle JDBC ReadTimeout QueryTimeout