public static String detectSourceType ( SQLiteModelMethod method , TypeName adapterTypeName ) { TypeElement a = BaseProcessor . elementUtils . getTypeElement ( adapterTypeName . toString ( ) ) ; for ( Element i : BaseProcessor . elementUtils . getAllMembers ( a ) ) { if ( i . getKind ( ) == ElementKind . METHOD && "toJava" . equals ( i . getSimpleName ( ) . toString ( ) ) ) { ExecutableElement m = ( ExecutableElement ) i ; return TypeUtility . typeName ( m . getReturnType ( ) ) . toString ( ) ; } } AssertKripton . fail ( "In method '%s#%s', class '%s' can not be used as type adapter" , method . getParent ( ) , method . getName ( ) , adapterTypeName . toString ( ) ) ; return null ; }
Give a param with type adapter obtain type used to convert param