@@ -1061,13 +1061,13 @@ func buildJavaWrapper(component ComponentDefinition, w LanguageWriter, indent st
10611061 // Write wrapper functions
10621062 for j := 0 ; j < len (component .Global .Methods ); j ++ {
10631063 method := component .Global .Methods [j ]
1064- w .Writeln (" protected Function %s_%s;" , strings .ToLower (NameSpace ), strings .ToLower (method .MethodName ))
1064+ w .Writeln (" protected com.sun.jna. Function %s_%s;" , strings .ToLower (NameSpace ), strings .ToLower (method .MethodName ))
10651065 }
10661066 for i := 0 ; i < len (component .Classes ); i ++ {
10671067 class := component .Classes [i ]
10681068 for j := 0 ; j < len (class .Methods ); j ++ {
10691069 method := class .Methods [j ]
1070- w .Writeln (" protected Function %s_%s_%s;" , strings .ToLower (NameSpace ), strings .ToLower (class .ClassName ), strings .ToLower (method .MethodName ))
1070+ w .Writeln (" protected com.sun.jna. Function %s_%s_%s;" , strings .ToLower (NameSpace ), strings .ToLower (class .ClassName ), strings .ToLower (method .MethodName ))
10711071 }
10721072 }
10731073 w .Writeln ("" )
@@ -1097,7 +1097,7 @@ func buildJavaWrapper(component ComponentDefinition, w LanguageWriter, indent st
10971097 w .Writeln (" }" )
10981098 w .Writeln ("" )
10991099 w .Writeln (" public %s(Pointer lookupPointer) throws %sException {" , JavaWrapperName , NameSpace )
1100- w .Writeln (" Function lookupMethod = Function.getFunction(lookupPointer);" )
1100+ w .Writeln (" com.sun.jna. Function lookupMethod = com.sun.jna. Function.getFunction(lookupPointer);" )
11011101 for j := 0 ; j < len (component .Global .Methods ); j ++ {
11021102 method := component .Global .Methods [j ]
11031103 w .Writeln (" %s_%s = loadFunctionByLookup(lookupMethod, \" %s_%s\" );" , strings .ToLower (NameSpace ), strings .ToLower (method .MethodName ), strings .ToLower (NameSpace ), strings .ToLower (method .MethodName ))
@@ -1137,15 +1137,15 @@ func buildJavaWrapper(component ComponentDefinition, w LanguageWriter, indent st
11371137 w .Writeln (" }" )
11381138 w .Writeln (" }" )
11391139 w .Writeln ("" )
1140- w .Writeln (" private Function loadFunctionByLookup(Function lookupMethod, String functionName) throws %sException {" , NameSpace )
1140+ w .Writeln (" private com.sun.jna. Function loadFunctionByLookup(com.sun.jna. Function lookupMethod, String functionName) throws %sException {" , NameSpace )
11411141 w .Writeln (" byte[] bytes = functionName.getBytes(StandardCharsets.UTF_8);" )
11421142 w .Writeln (" Memory name = new Memory(bytes.length+1);" )
11431143 w .Writeln (" name.write(0, bytes, 0, bytes.length);" )
11441144 w .Writeln (" name.setByte(bytes.length, (byte)0);" )
11451145 w .Writeln (" Pointer address = new Memory(8);" )
11461146 w .Writeln (" java.lang.Object[] addressParam = new java.lang.Object[]{name, address};" )
11471147 w .Writeln (" checkError(null, lookupMethod.invokeInt(addressParam));" )
1148- w .Writeln (" return Function.getFunction(address.getPointer(0));" )
1148+ w .Writeln (" return com.sun.jna. Function.getFunction(address.getPointer(0));" )
11491149 w .Writeln (" }" )
11501150 w .Writeln ("" )
11511151 for _ , subComponent := range (component .ImportedComponentDefinitions ) {
0 commit comments