com.atlassian.jira.issue.fields.rest.json
Class TypeRef<T>

java.lang.Object
  extended by com.atlassian.jira.issue.fields.rest.json.TypeRef<T>
All Implemented Interfaces:
Comparable<TypeRef<T>>

public abstract class TypeRef<T>
extends Object
implements Comparable<TypeRef<T>>

This class is used to pass full generics type information. It is based on ideas from http://gafter.blogspot.com/2006/12/super-type-tokens.html,

To use this class create an anonymous subclass, e.g. to deserialise to generic type List<User>:

  TypeRef ref = new TypeRef<List<User>>() { };
 


Constructor Summary
protected TypeRef()
           
 
Method Summary
 int compareTo(TypeRef<T> o)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeRef

protected TypeRef()
Method Detail

compareTo

public int compareTo(TypeRef<T> o)
Specified by:
compareTo in interface Comparable<TypeRef<T>>


Copyright © 2002-2013 Atlassian. All Rights Reserved.