public TypeRef findCallbackRef(FunctionSignature s, Identifier callerLibraryClass) { String library = s == null ? null : result.getLibrary(s); if (library == null) { return null; } // Struct parentStruct = s.findParentOfType(Struct.class); // if (parentStruct != null && (parentStruct.getType() == Struct.Type.ObjCClass || parentStruct.getType() == Struct.Type.ObjCProtocol)) { // Identifier structName = result.declarationsConverter.getActualTaggedTypeName(parentStruct); // return // typeRef(ident(structName, inferCallBackName(s, true, true))); // } Identifier identifier = s.getResolvedJavaIdentifier(); if (identifier == null) { throw new UnsupportedConversionException(s, null); } return typeRef(identifier); // return typeRef(libMember(result.getLibraryClassFullName(library), callerLibraryClass, inferCallBackName(s, true, true))); //typeRef(ident(result.getLibraryClassFullName(library), inferCallBackName(s, true))); }
public TypeRef findCallbackRef(FunctionSignature s, Identifier callerLibraryClass) { String library = s == null ? null : result.getLibrary(s); if (library == null) { return null; } // Struct parentStruct = s.findParentOfType(Struct.class); // if (parentStruct != null && (parentStruct.getType() == Struct.Type.ObjCClass || parentStruct.getType() == Struct.Type.ObjCProtocol)) { // Identifier structName = result.declarationsConverter.getActualTaggedTypeName(parentStruct); // return // typeRef(ident(structName, inferCallBackName(s, true, true))); // } Identifier identifier = s.getResolvedJavaIdentifier(); if (identifier == null) { throw new UnsupportedConversionException(s, null); } return typeRef(identifier); // return typeRef(libMember(result.getLibraryClassFullName(library), callerLibraryClass, inferCallBackName(s, true, true))); //typeRef(ident(result.getLibraryClassFullName(library), inferCallBackName(s, true))); }