blob: e187f3c02c192c2b95a29d418677545503cad38c [file] [log] [blame]
Stuart McCullochbb014372012-06-07 21:57:32 +00001package aQute.bnd.compatibility;
2
3public class GenericParameter {
4 String name;
5 GenericType bounds[];
6
7 public GenericParameter(String name, GenericType[] bounds) {
8 this.name = name;
9 this.bounds = bounds;
10 if (bounds == null || bounds.length == 0)
11 this.bounds = new GenericType[] { new GenericType( Object.class) };
12 }
13
14 public String toString() {
15 StringBuilder sb = new StringBuilder();
16 sb.append(name);
17 if ( bounds != null && bounds.length > 0) {
18 for ( GenericType gtype : bounds ) {
19 sb.append( ":");
20 sb.append(gtype);
21 }
22 }
23 return sb.toString();
24 }
25}