Ejemplo n.º 1
0
 // Validate stereotypes cache of the class. The stereotypes found are 1.
 // restricted to those defined within ShapeChange and 2. deprecated ones
 // are normalized to the lastest definitions.
 public void validateStereotypesCache() {
   if (stereotypesCache == null) {
     // Fetch stereotypes 'collection' ...
     String sts = eaClassElement.GetStereotypeEx();
     String[] stereotypes = sts.split("\\,");
     // Allocate cache
     stereotypesCache = options().stereotypesFactory();
     // Copy stereotypes found in class selecting those defined in
     // ShapeChange and normalizing deprecated ones.
     for (String stereotype : stereotypes) {
       String st = document.options.normalizeStereotype(stereotype.trim());
       if (st != null)
         for (String s : Options.classStereotypes) {
           if (st.toLowerCase().equals(s)) stereotypesCache.add(s);
         }
     }
   }
 } // validateStereotypesCache()