List CreateNewStatements(ForLoop L)
{
List stmts = new ArrayList();
FlatIterator iter = new FlatIterator(L.getBody());
Traversable t1 = null;
LoopUnroll l = new LoopUnroll(t1);
while(iter.hasNext())
{
stmts.add(iter.next().clone());
}
return stmts;
}
The above code is giving the error as "The method clone() from the type Object is not visible".
In the above code, iter.next() returns a statement(Eg. fx[i] = fx[i] + x) of type Object(built in into java library) using which I want to call the method clone(). The above code is written in a class LoopUnroll and clone() is a method defined in the class Statement.