JavaClass javaClass = new JavaClass("MyClass", new JavaPackage("mypackage"));
JavaField javaField = new JavaField(int.class, "count");
javaField.setValue(0);
javaField.getModifiers().add(JavaModifier.PRIVATE);
javaClass.addField(javaField);
JavaField field =
new JavaField(UIComponentBase.class, "component", "null");
field.addModifier(JavaModifier.PUBLIC);
field.addAnnotation(Deprecated.class);