I have an interface called AbstractFactory.java.
public interface AbstractFactory {
public ArrayList<TestStruct> getListOfStruct();
}
This interface is implemented in ExcelTester.xtend class.
class ExcelTester implements AbstractFactory {
override getListOfStruct()
{
val a = new ArrayList<TestStruct>
return a
}
}
TestStruct is a class that contains list of variables.
class TestStruct
{
@Property int iRow;
@Property int iCol;
@Property String sContents;
}
This code was able to compile but if I do a clean build, an error is thrown.
"The method getListOfStruct() : ArrayList<TestStruct> of type
ExcelTester must override a superclass method."
In order to fix this error, I just need to "touch" the file (add space anywhere and save the file).
I am already using the override keyword. Anyone have any idea how to make the error go away?
This should not happen during a clean build since there is no error on the code. This error only occurs if the return value of the method is an ArrayList.
Is there a limitation on using java interfaces with xtend?
[Updated on: Fri, 25 July 2014 05:28]
Report message to a moderator