You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by Mark Struberg <st...@yahoo.de> on 2009/01/21 19:40:12 UTC

IStereoTypeModel question

Hi!

Maybe I misinterpreted the meaning of the IStereoTypeModel: this is for storing information about paresed @Steroptype annotations and steroptypes defined via XML, isn't?

I'm confused about the getName() and setName(String) because the spec states:

> 2.7.1.3. Specifying name defaulting for a stereotype
> A stereotype may declare an empty @Named annotation. If a 
> stereotype declares a non-empty @Named annotation, a 
> DefinitionException is thrown by the container at deployment time.

so instead of the String getName/setName I'd expect a boolean isDefaultNamed(). WDYT?

LieGrue,
strub



      

Re: IStereoTypeModel question

Posted by Gurkan Erdogdu <gu...@yahoo.com>.
getName () in IStereoTypeModel defines the class name of the StereoType, not the @Named value. Each component name is defined using the DefinitionUtil.defineName method. Please look at this method.

Also stereotypes is check at the container startup via WebBeansContainerDeployer#checkStereoTypes(WebBeansScanner scanner). Checking for the stereotype is done via WebBeansUtil.checkStereoTypeClass(stereoClass);

/Gurkan




________________________________
From: Mark Struberg <st...@yahoo.de>
To: openwebbeans-dev@incubator.apache.org
Sent: Wednesday, January 21, 2009 8:40:12 PM
Subject: IStereoTypeModel question

Hi!

Maybe I misinterpreted the meaning of the IStereoTypeModel: this is for storing information about paresed @Steroptype annotations and steroptypes defined via XML, isn't?

I'm confused about the getName() and setName(String) because the spec states:

> 2.7.1.3. Specifying name defaulting for a stereotype
> A stereotype may declare an empty @Named annotation. If a 
> stereotype declares a non-empty @Named annotation, a 
> DefinitionException is thrown by the container at deployment time.

so instead of the String getName/setName I'd expect a boolean isDefaultNamed(). WDYT?

LieGrue,
strub