Polymorphic Classes 

Polymorphic classes are defined using withTypeParams(...):

scala> import treehugger.forest._, definitions._, treehuggerDSL._
import treehugger.forest._
import definitions._
import treehuggerDSL._

scala> val tree = (CLASSDEF("Queue") withTypeParams(TYPEVAR("A"))
  withParams(VAL("leading", "A"), VAL("trailing", "A")): Tree)
tree: treehugger.forest.Tree = ClassDef(Modifiers(, , Map()),Modifiers(, , Map()),Queue,List(TypeDef(Modifiers(, , Map()),A,List(),EmptyTree)),List(ValDef(Modifiers(, , Map()),Typed(Ident(leading),TypeTree()),EmptyTree), ValDef(Modifiers(, , Map()),Typed(Ident(trailing),TypeTree()),EmptyTree)),Template(List(),ValDef(Modifiers(private, , Map()),Ident(_),EmptyTree),List()))

scala> treeToString(tree)
res0: String = class Queue[A](val leading: A, val trailing: A)