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 <[email protected]>
To: [email protected]
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


      

Reply via email to