On 4/20/2011 13:24, Jörn Kottmann wrote: > On 4/20/11 1:13 PM, Thilo Götz wrote: >> On 4/20/2011 11:57, Jörn Kottmann wrote: >>> > Hello all, >>> > > the Cas Editor needs to create feataure structures. To detect >>> > that a FS is an array Type.isArray is called. If it returns true >>> > an if-else-if statement is used to create the array. >>> > > For some reason this code fails for a certain type, but I do not know >>> which, >>> > would be nice if you could have a look here: >>> > >>> http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/editview/EditViewPage.java?view=markup >>> >>> > > > The if-else-if-else statement is at line 387 to 408. For one type >>> the else is >>> > executed and >>> > logs the error message. >> Maybe this has to do with array's type parameter? I think it's part >> of the array's type name, like ArrayFS<AnnotationFS>, or something like >> that. >> > For me it looks like it is not possible to write ArrayFS<AnnotationFS>, > because > the ArrayFS interface > does not define a type parameter, right? > > For me it looks like that Type.isArray returns true for a type which has a > different > name then the array type names in this list. The isArray method seems to use > some low-level methods to figure out if a type is an array type or not.
It would really be helpful if you could tell me for which type name this is failing. > > Is it possible to define a new array type? Not as a user, no. > > Jörn >
