IntentMethod.java 文件源码

java
阅读 29 收藏 0 点赞 0 评论 0

项目:SwiftModule 作者:
private Bundle prepareBundle(Object[] args) {
  Bundle bundle = new Bundle();
  int paramCount = parameterTypes.length;
  if (parameterTypes != null && paramCount > 0){
    for (int i = 0; i < paramCount; i++) {
      String key;
      Annotation[] paramAnnotations = parameterAnnotationsArray[i];
      for (Annotation anno: paramAnnotations) {
        if (anno instanceof Key){
          key = ((Key) anno).value();
          handleParams(bundle, key, parameterTypes[i], args[i]);
        }else if(anno instanceof FieldMap){

        }else{
          throw new IllegalStateException("不支持的参数注解: " + anno.toString() );
        }
      }
    }
  }
  return bundle;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号