Hi,

Thanks for the quick answer.

On Fri, Nov 27, 2009 at 4:56 PM, Thilo Goetz <[email protected]> wrote:
> I guess this will work, as long as there even is a JCas type
> for the type you're looking for.  There may not always be one,
> and we have this whole meta-programming kind of API for this
> kind of situation.  If you tell us what you need the class for,
> we may be able to suggest alternative ways of handling this.

My need is quite simple, a component I develop work on some types
passed to the component in parameter. I retrieve the type from its
name passed in parameter with a simple :

Type mMonType  = cas.getTypeSystem().getType(theParameterTypeStr);

... and I check it is not null before using it.

Now I use some generic classes (java generics) for my processing and I
need to "configure" them with the class of the annotation
corresponding to this type. That's where I'm lost...

I could use a common ancestor like "tcas.Annotation" but I'd prefer to
use the correct class.

Any hint ?

--
Fabien Poulard

Reply via email to