Ken Cavanaugh - The Gmbal project
Ken Cavanaugh - The Gmbal project
Ken Cavanaugh - The Gmbal project
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
org.glassfish.gmbal.typelib<br />
Evaluated generic types (replaces type variables with types) so that<br />
<strong>Gmbal</strong> can easily use type information to generate open types<br />
Example:<br />
@ManagedData<br />
public interface Bar {<br />
@ManagedAttribute<br />
String getName() ;<br />
}<br />
@ManagedAttribute<br />
String getAddress() ;<br />
@ManagedData<br />
public interface Foo {<br />
@ManagedAttribute<br />
List getElems() ;<br />
}<br />
@ManagedObject<br />
public interface Baz {<br />
@ManagedAttribute<br />
Foo getFoo()<br />
}<br />
Foo is annotated as @ManagedData<br />
Needs to be OpenData<br />
But we can’t tell what type T is in Foo<br />
Baz has an instance of Foo with T<br />
instantiated to Bar<br />
Note that Foo also has an instance of the<br />
standard List, with is declared with its own<br />
type variable T (see java.util.List)<br />
Typelib replaces all type variables with the<br />
values to which they are bound<br />
It is a bit tricky due to the need to handle<br />
complex recursive references to types<br />
Friday, December 11, 2009<br />
20