Class RetrofitType
- java.lang.Object
-
- com.github.jasminb.jsonapi.retrofit.RetrofitType
-
public class RetrofitType extends Object
Simple class used to simplify type management in Retrofit converter factory.
-
-
Constructor Summary
Constructors Constructor Description RetrofitType(Type type)Instantiates a new Retrofit type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<?>getType()Gets type.booleanisCollection()Is collection boolean.booleanisJSONAPIDocumentType()Returns true if type used to instantiate this object was wrapped withJSONAPIDocument.booleanisValid()Is valid boolean.
-
-
-
Constructor Detail
-
RetrofitType
public RetrofitType(Type type)
Instantiates a new Retrofit type.- Parameters:
type- the type
-
-
Method Detail
-
isJSONAPIDocumentType
public boolean isJSONAPIDocumentType()
Returns true if type used to instantiate this object was wrapped withJSONAPIDocument.- Returns:
Boolean
-
getType
public Class<?> getType()
Gets type.- Returns:
- the type
-
isCollection
public boolean isCollection()
Is collection boolean.- Returns:
trueif type was ParameterizedType elsefalse
-
isValid
public boolean isValid()
Is valid boolean.- Returns:
trueif type is valid, elsefalse
-
-