Ejemplo n.º 1
0
 // Validate operations cache. This makes sure the operations cache contains
 // all Operations ordered by their appearance in the class.
 private void validateOperationsCache() {
   if (operationsCache == null) {
     // Allocate the cache
     operationsCache = new TreeMap<Integer, OperationInfo>();
     // Load methods ...
     Collection<Method> meths = eaClassElement.GetMethods();
     int i = 0;
     // Ensure that there are methods before continuing
     if (meths != null) {
       for (Method meth : meths) {
         // Create the operation object.
         OperationInfoEA oi = new OperationInfoEA(document, this, meth);
         // Drop in cache
         // operationsCache.put(oi.eaMethod.GetPos(), oi); <-- does
         // not work!
         operationsCache.put(++i, oi);
       }
     }
   }
 } // validateOperationsCache()