美文网首页
Android Studio 中自定义Lint MethodIn

Android Studio 中自定义Lint MethodIn

作者: 百花鱼藤 | 来源:发表于2017-05-17 16:09 被阅读0次

一.假如我们对某些方法做规则限制或者查找方法。会回调如下方法:

1.node.toString() 返回方法的调用者,修饰符,包括参数:animatorSet.addListener(listener) ,如果参数是接口,会返回接口的实现。

2.node.astName() 返回方法的名称如:addListener。

3.node.astOperand() 返回方法的调用者:animatorSet

4.node.astArguments() 返回方法的参数

二.经过下图转换

1.method.toString() 返回方法的定义:public android.animation.ValueAnimator setDuration(long)

2.method.method.getContainingClass():返回:public android.animation.ValueAnimator

相关文章

网友评论

      本文标题:Android Studio 中自定义Lint MethodIn

      本文链接:https://www.haomeiwen.com/subject/woedxxtx.html