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 - ability to create a generic class element having hierarchy argument, in drawing area is requested
Summary: ability to create a generic class element having hierarchy argument, in drawi...
Status: NEW
Alias: None
Product: uml
Classification: Unclassified
Component: Diagram Class (show other bugs)
Version: 5.x
Hardware: All All
: P1 blocker (vote)
Assignee: issues@uml
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-31 13:07 UTC by bugbridge
Modified: 2007-03-07 14:05 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.