RuntimePermissionsElement.java 文件源码

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

项目:PermissionDispatcher 作者:
public RuntimePermissionsElement(TypeElement element, TypeResolver resolver) {
    mTypeResolver = resolver;
    mTypeName = TypeName.get(element.asType());
    typeVariables = new ArrayList<>();
    List<? extends TypeParameterElement> typeParameters = element.getTypeParameters();
    for (TypeParameterElement element1 : typeParameters) {
        typeVariables.add(TypeVariableName.get(element1));
    }
    String claseName = element.getQualifiedName().toString();
    packageName = ProcessorUtil.getPackageName(claseName);
    className = ProcessorUtil.getClassName(claseName);
    classType = checkActivity(element, resolver);
    generatedClassName = element.getSimpleName().toString() + ConstantsProvider.GEN_CLASS_SUFFIX;
    needsPermissionsMethods = findMethods(element, NeedsPermission.class);
    validateNeedsMethods();

    showsRationaleMethods = findMethods(element, OnShowRationale.class);
    validateRationaleMethods();

    deniedPermissionMethods = findMethods(element, OnPermissionDenied.class);
    validateDeniedMethods();

    neverAskMethods = findMethods(element, OnNeverAskAgain.class);
    validateNeverAskMethods();
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号