Taglib taglibAnnotation = packageDeclaration.getAnnotation(Taglib.class);
Set<String> tagSet = new HashSet<String>();
String packageName = "org.apache.myfaces.tobago.facelets";
JClass libraryClass = new JClass("TobagoTagLibrary");
libraryClass.setPackageName(packageName);
JCompUnit unit = new JCompUnit(libraryClass);
libraryClass.setSuperClass("AbstractTobagoTagLibrary");
JField nameSpace = new JField(new JClass("String"), "NAMESPACE");
nameSpace.getModifiers().setFinal(true);
nameSpace.getModifiers().setStatic(true);
nameSpace.getModifiers().makePublic();
nameSpace.setInitString("\""+taglibAnnotation.uri()+"\"");
libraryClass.addField(nameSpace);
JField instance = new JField(libraryClass, "INSTANCE");
instance.getModifiers().setFinal(true);
instance.getModifiers().setStatic(true);
instance.getModifiers().makePublic();
instance.setInitString("new "+libraryClass.getName(true) +"()");
libraryClass.addField(instance);
JConstructor constructor = libraryClass.createConstructor();
constructor.getSourceCode().add("super(NAMESPACE);");
for (InterfaceDeclaration decl : getCollectedInterfaceDeclarations()) {
if (decl.getPackage().equals(packageDeclaration)) {
appendComponent(constructor, decl, tagSet);