Method accepts only anonymous arrays, like:
setSomeValue(new String[] {'v1', 'v2', 'v3'));
I want to copy the values of another array into this anonymous array before sending it to the setSomeValue method.
The setsomeValue method:
public void setSomeValue(String[] pArrayName) { vararray = pArrayName; }
public void getSomeValue() { return vararray;}
But the place where getSomeValue is called does some Rql Querys and etc.
QueryExpression valueQE =
pQueryBuilder.createConstantQueryExpression(getSomeValue());
I think this is key this method createConstantQueryExpression
expects and Object! but all along I'm setting String[] array, but since its anonymous, its being treated as an Object.
ANSWER: Sorry guys for confusing you.. yes you all are geniuses dont underestimate yourselves lol.. The problem was that the query which was being generated was not right, there were issues with the content, the array itself was processed properly whether it was an anonymous array or not! and YES there is no condition where a method will accept only an anonymous array (atleast not in this case)