This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 83912

Summary: ability to create a generic class element having hierarchy argument, in drawing area is requested
Product: uml Reporter: bugbridge <bugbridge>
Component: Diagram ClassAssignee: issues@uml <issues>
Status: NEW ---    
Severity: blocker    
Priority: P1    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description bugbridge 2006-08-31 13:07:10 UTC
wanted to create a class element in the drawing area, that is equivalent to the
following code. Looks like its not possible.

class Stats<T extends Number> {  
  T[] nums; // array of Number or subclass 
  // Pass the constructor a reference to   
  // an array of type Number or subclass. 
  Stats(T[] o) {  
    nums = o;  
  }  
  // Return type double in all cases. 
  double average() {  
    double sum = 0.0; 
    for(int i=0; i < nums.length; i++)  
      sum += nums[i].doubleValue(); 
    return sum / nums.length; 
  }  
}

tspiva comment:
Our metamodel will not support this type of construct.