ochafik/nativelibs4java — Issue #249: Compile error - JavaCLGenerator
Author: finson
Created: 2012-01-26 19:15:54+00:00
State: open

There is a method signature mismatch in the OpenCL-JNA class JavaCLGenerator. An anonymous inner class is defined as a subclass of DeclarationsConverter:

```
declarationsConverter = new DeclarationsConverter(this) {
@Override
public void convertFunction(Function function, Signatures signatures, boolean isCallback, DeclarationsHolder out, Identifier libraryClassName) {...
```

However, the method being overridden is defined in com.ochafik.lang.jnaerator.DeclarationsConverter as follows:

```
public void convertFunction(Function function, Signatures signatures, boolean isCallback, final DeclarationsHolder out, final Identifier libraryClassName, int iConstructor) {...
```

This results in a compiler error and a build failure.

```
[INFO] Compiling 1 source file to E:\Users\finson\git\nativelibs4java\libraries\OpenCL-JNA\Generator\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] \Users\finson\git\nativelibs4java\libraries\OpenCL-JNA\Generator\src\main\java\com\nativelibs4java\opencl\generator\JavaCLGenerator.java:[153,20] method does not override or implement a method from a supertype
[INFO] 1 error
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
```