Var x = new Var(0,TypeName.OBJECT) ;
MethodDef md = new MethodDef(TypeName.BOOLEAN,"getFoo",x) ;
md = md.setStatic(true) ;
md = md.addInstructions(
new Load(x),
new InstanceOf(new TypeName(type)),
new Return(TypeCode.BOOLEAN)
) ;
cd = cd.addMethod(md) ;
}
return cd ;