if (!(m.getParentElement() instanceof Struct)) { return false; Struct s = (Struct) m.getParentElement(); Identifier n = s.getTag(); if (n != null && n.equals("NSObject"))// || n.equals("NSClass"))
@Override public void visitFunction(Function function) { if (!result.config.noComments) { if (!(function.getParentElement() instanceof FunctionSignature) && result.config.features.contains(GenFeatures.OriginalFunctionSignatures)) { function.moveAllCommentsBefore(); function.addToCommentBefore("Original signature : <code>" + function.computeSignature(SignatureType.Full) + "</code>"); } } // function.addToCommentBefore("File : " + Element.getFileOfAscendency(function)); super.visitFunction(function); // if (function.getValueType() != null && !function.getValueType().toString().equals("void")) // function.addToCommentBefore("@return " + Element.cleanComment(function.getValueType().toString())); }
@Override public void visitFunction(Function function) { if (!result.config.noComments) { if (!(function.getParentElement() instanceof FunctionSignature) && result.config.features.contains(GenFeatures.OriginalFunctionSignatures)) { function.moveAllCommentsBefore(); function.addToCommentBefore("Original signature : <code>" + function.computeSignature(SignatureType.Full) + "</code>"); } } // function.addToCommentBefore("File : " + Element.getFileOfAscendency(function)); super.visitFunction(function); // if (function.getValueType() != null && !function.getValueType().toString().equals("void")) // function.addToCommentBefore("@return " + Element.cleanComment(function.getValueType().toString())); }
if (!(m.getParentElement() instanceof Struct)) { return false; Struct s = (Struct) m.getParentElement(); Identifier n = s.getTag(); if (n != null && n.equals("NSObject"))// || n.equals("NSClass"))
@Override public void visitFunction(Function function) { super.visitFunction(function); Element parent = function.getParentElement(); if (parent != null) { if (parent instanceof FunctionSignature) { return; } if (parent instanceof Struct) { Struct parentStruct = (Struct) parent; switch (parentStruct.getType()) { case CPPClass: // if (config.genCPlusPlus) // break; case JavaClass: case JavaInterface: case ObjCClass: case ObjCProtocol: case CStruct: return; } } } getList(functionsByLibrary, getLibrary(function)).add(function); }
@Override public void visitFunction(Function function) { super.visitFunction(function); Element parent = function.getParentElement(); if (parent != null) { if (parent instanceof FunctionSignature) { return; } if (parent instanceof Struct) { Struct parentStruct = (Struct) parent; switch (parentStruct.getType()) { case CPPClass: // if (config.genCPlusPlus) // break; case JavaClass: case JavaInterface: case ObjCClass: case ObjCProtocol: case CStruct: return; } } } getList(functionsByLibrary, getLibrary(function)).add(function); }
String getFileCommentContent(File file, Element e) { if (file != null) { String path = result.config.relativizeFileForSourceComments(file.getAbsolutePath()); String inCategoryStr = ""; if (e instanceof Function) { Function fc = (Function) e; Struct parent; if (fc.getType() == Type.ObjCMethod && ((parent = as(fc.getParentElement(), Struct.class)) != null) && (parent.getCategoryName() != null)) { inCategoryStr = "from " + parent.getCategoryName() + " "; } } return "<i>" + inCategoryStr + "native declaration : " + path + (e == null || e.getElementLine() < 0 ? "" : ":" + e.getElementLine()) + "</i>"; } else if (e != null && e.getElementLine() >= 0) { return "<i>native declaration : <input>:" + e.getElementLine() + "</i>"; } return null; }
String getFileCommentContent(File file, Element e) { if (file != null) { String path = result.config.relativizeFileForSourceComments(file.getAbsolutePath()); String inCategoryStr = ""; if (e instanceof Function) { Function fc = (Function) e; Struct parent; if (fc.getType() == Type.ObjCMethod && ((parent = as(fc.getParentElement(), Struct.class)) != null) && (parent.getCategoryName() != null)) { inCategoryStr = "from " + parent.getCategoryName() + " "; } } return "<i>" + inCategoryStr + "native declaration : " + path + (e == null || e.getElementLine() < 0 ? "" : ":" + e.getElementLine()) + "</i>"; } else if (e != null && e.getElementLine() >= 0) { return "<i>native declaration : <input>:" + e.getElementLine() + "</i>"; } return null; }
boolean isMethod = function.getParentElement() instanceof Struct; if (functionName == null || isCallback) { if (function.getParentElement() instanceof FunctionSignature) { functionName = ident(result.config.callbackInvokeMethodName); } else { if (function.getParentElement() instanceof FriendDeclaration) { return;
boolean isMethod = function.getParentElement() instanceof Struct; if (functionName == null || isCallback) { if (function.getParentElement() instanceof FunctionSignature) { functionName = ident(result.config.callbackInvokeMethodName); } else { if (function.getParentElement() instanceof FriendDeclaration) { return;
assert implementations != null; boolean extractingDeclarations = declarations != null && declarations.resolveHolder() != implementations.resolveHolder(); Element parent = function.getParentElement(); MemberVisibility visibility = function.getVisibility(); boolean isPublic = visibility == MemberVisibility.Public || function.hasModifier(ModifierType.Public);
assert implementations != null; boolean extractingDeclarations = declarations != null && declarations.resolveHolder() != implementations.resolveHolder(); Element parent = function.getParentElement(); MemberVisibility visibility = function.getVisibility(); boolean isPublic = visibility == MemberVisibility.Public || function.hasModifier(ModifierType.Public);
((DeclarationsHolder) original.getParentElement()).addDeclaration(fDirect);
((DeclarationsHolder) original.getParentElement()).addDeclaration(fDirect);
Element parent = function.getParentElement(); boolean isMethod = parent instanceof Struct; if (isMethod) {
Element parent = function.getParentElement(); boolean isMethod = parent instanceof Struct; if (isMethod) {
moveModifiersOfType(ModifierKind.CallingConvention, function.getValueType(), function); } else { Element parent = function.getParentElement(); boolean returnsInt = false; if (parent instanceof Struct) {
moveModifiersOfType(ModifierKind.CallingConvention, function.getValueType(), function); } else { Element parent = function.getParentElement(); boolean returnsInt = false; if (parent instanceof Struct) {
String sig, Identifier functionName, String library, int iConstructor) { assert implementations == declarations || declarations == null; String methodName = library + "_" + (function.getParentElement() instanceof Struct ? ((Struct) function.getParentElement()).getTag() + "_" : "") + function.getName(); Function method = new Function(Function.Type.CppMethod, ident(methodName), typeRef(v8Ident("Handle", v8Ident("Value")))); method.addArg(new Arg(argsName, new TypeRef.Pointer(typeRef(v8Ident("Arguments")), Declarator.PointerStyle.Reference).addModifiers(ModifierType.Const)));
String sig, Identifier functionName, String library, int iConstructor) { assert implementations == declarations || declarations == null; String methodName = library + "_" + (function.getParentElement() instanceof Struct ? ((Struct) function.getParentElement()).getTag() + "_" : "") + function.getName(); Function method = new Function(Function.Type.CppMethod, ident(methodName), typeRef(v8Ident("Handle", v8Ident("Value")))); method.addArg(new Arg(argsName, new TypeRef.Pointer(typeRef(v8Ident("Arguments")), Declarator.PointerStyle.Reference).addModifiers(ModifierType.Const)));