A transform that makes it possible to attach Link instances to any class. Two methods are added, one called link(Map args) and another called links() to retrieve the links. Example:
- Linkable:
- class Book {
String title
}
def b = new Book()
b.link(rel:"publisher", href="http://foo.com/books")
println b.links()
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |