blob: 1eac28c1d0bc98bfe2d7b8ef6655988e68171231 [file] [log] [blame]
Stuart McCulloch26e7a5a2011-10-17 10:31:43 +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 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}