protected void checkTypeAdapter ( @ SuppressWarnings ( "rawtypes" ) ModelEntity entity , TypeMirror propertyType , TypeAdapter typeAdapter , ModelAnnotation annotation ) { TypeName sourceType = TypeUtility . typeName ( TypeAdapterHelper . detectSourceType ( entity . getElement ( ) , typeAdapter . adapterClazz ) ) ; TypeName uboxSourceType = sourceType ; if ( TypeUtility . isTypeWrappedPrimitive ( sourceType ) ) { uboxSourceType = sourceType . unbox ( ) ; } boolean expr = uboxSourceType . toString ( ) . equals ( propertyType . toString ( ) ) || sourceType . toString ( ) . equals ( propertyType . toString ( ) ) ; AssertKripton . fail ( ! expr , "In class '%s', property '%s' uses @%s that manages type '%s' instead of '%s'" , entity . getElement ( ) . asType ( ) , getName ( ) , annotation . getSimpleName ( ) , element . asType ( ) . toString ( ) , TypeAdapterHelper . detectSourceType ( entity . getElement ( ) , typeAdapter . adapterClazz ) , getPropertyType ( ) . getTypeName ( ) ) ; }
Check type adapter .