public void addProtocol(Identifier parent) { addProtocol(typeRef(parent)); } public void addProtocol(SimpleTypeRef protocol) {
Struct publicStaticClass(Identifier name, Identifier parentName, Struct.Type type, Element toCloneCommentsFrom, Identifier... interfaces) { Struct cl = new Struct(); cl.setType(type); cl.setTag(name); if (parentName != null) { cl.setParents(typeRef(parentName)); } if (type == Struct.Type.JavaInterface) { for (Identifier inter : interfaces) { cl.addParent(typeRef(inter)); } } else { for (Identifier inter : interfaces) { cl.addProtocol(typeRef(inter)); } } if (!result.config.noComments) { cl.importComments(toCloneCommentsFrom, getFileCommentContent(toCloneCommentsFrom)); } cl.addModifiers(ModifierType.Public, ModifierType.Static); return cl; }
Struct publicStaticClass(Identifier name, Identifier parentName, Struct.Type type, Element toCloneCommentsFrom, Identifier... interfaces) { Struct cl = new Struct(); cl.setType(type); cl.setTag(name); if (parentName != null) { cl.setParents(typeRef(parentName)); } if (type == Struct.Type.JavaInterface) { for (Identifier inter : interfaces) { cl.addParent(typeRef(inter)); } } else { for (Identifier inter : interfaces) { cl.addProtocol(typeRef(inter)); } } if (!result.config.noComments) { cl.importComments(toCloneCommentsFrom, getFileCommentContent(toCloneCommentsFrom)); } cl.addModifiers(ModifierType.Public, ModifierType.Static); return cl; }
Struct publicStaticClass(Identifier name, Identifier parentName, Struct.Type type, Element toCloneCommentsFrom, Identifier... interfaces) { Struct cl = new Struct(); cl.setType(type); cl.setTag(name); if (parentName != null) { cl.setParents(typeRef(parentName)); } if (type == Struct.Type.JavaInterface) { for (Identifier inter : interfaces) { cl.addParent(typeRef(inter)); } } else { for (Identifier inter : interfaces) { cl.addProtocol(typeRef(inter)); } } if (!result.config.noComments) { cl.importComments(toCloneCommentsFrom, getFileCommentContent(toCloneCommentsFrom)); } cl.addModifiers(ModifierType.Public, ModifierType.Static); return cl; }
Struct publicStaticClass(Identifier name, Identifier parentName, Struct.Type type, Element toCloneCommentsFrom, Identifier... interfaces) { Struct cl = new Struct(); cl.setType(type); cl.setTag(name); if (parentName != null) { cl.setParents(typeRef(parentName)); } if (type == Struct.Type.JavaInterface) { for (Identifier inter : interfaces) { cl.addParent(typeRef(inter)); } } else { for (Identifier inter : interfaces) { cl.addProtocol(typeRef(inter)); } } if (!result.config.noComments) { cl.importComments(toCloneCommentsFrom, getFileCommentContent(toCloneCommentsFrom)); } cl.addModifiers(ModifierType.Public, ModifierType.Static); return cl; }
implementations.addParent(ident(config.runtime.libraryClass, expr(typeRef(implementationsSimpleClassName)))); if (declarationsFullClassName != null) { implementations.addProtocol(declarationsFullClassName.clone());
if ( state.backtracking==0 ) { struct.addProtocol(new SimpleIdentifier((p1!=null?p1.getText():null))); } if ( state.backtracking==0 ) { struct.addProtocol(new SimpleIdentifier((px!=null?px.getText():null))); }
implementations.addParent(ident(config.runtime.libraryClass, expr(typeRef(implementationsSimpleClassName)))); if (declarationsFullClassName != null) { implementations.addProtocol(declarationsFullClassName.clone());
instanceStruct.addProtocol(ident(ObjCObject.class)); } else { instanceStruct.addParent(id.clone()); instanceStruct.addParent(ident(ObjCObject.class)); } else if (isNSObject) { instanceStruct.addProtocol(ident(ObjCObject.class)); } else { instanceStruct.addParent(ident(NSObject.class)); instanceStruct.addParent(id); } else { instanceStruct.addProtocol(id); classInterfaceStruct.setTag(ident(classInterfaceNameInCategoriesAndProtocols)); classInterfaceStruct.addParent(ident(ObjCClass.class)); classStruct.addProtocol(ident(classInterfaceNameInCategoriesAndProtocols)); } else { structThatReceivesStaticMethods = classStruct;
instanceStruct.addProtocol(ident(ObjCObject.class)); } else { instanceStruct.addParent(id.clone()); instanceStruct.addParent(ident(ObjCObject.class)); } else if (isNSObject) { instanceStruct.addProtocol(ident(ObjCObject.class)); } else { instanceStruct.addParent(ident(NSObject.class)); instanceStruct.addParent(id); } else { instanceStruct.addProtocol(id); classInterfaceStruct.setTag(ident(classInterfaceNameInCategoriesAndProtocols)); classInterfaceStruct.addParent(ident(ObjCClass.class)); classStruct.addProtocol(ident(classInterfaceNameInCategoriesAndProtocols)); } else { structThatReceivesStaticMethods = classStruct;
if (librariesHub != null) { librariesHub.addDeclaration(instanceDecl); librariesHub.addProtocol(fullLibraryClassName.clone()); } else { interf.addDeclaration(instanceDecl); interf.addProtocol(libSuperInter); interf.setType(Struct.Type.JavaClass); } else {
if (librariesHub != null) { librariesHub.addDeclaration(instanceDecl); librariesHub.addProtocol(fullLibraryClassName.clone()); } else { interf.addDeclaration(instanceDecl); interf.addProtocol(libSuperInter); interf.setType(Struct.Type.JavaClass); } else {