private void processType(TypeElement type) {
        XposedHook annotation = type.getAnnotation(XposedHook.class);
        if (annotation == null) {
            mErrorReporter.abortWithError("@XposedHook annotation is null on Type %s", type);
            return;
        }
        if (type.getKind() != ElementKind.CLASS) {
            mErrorReporter.abortWithError("@XposedHook" + " only applies to class", type);
        }

        NestingKind nestingKind = type.getNestingKind();
        if (nestingKind != NestingKind.TOP_LEVEL) {
            mErrorReporter.abortWithError("@XposedHook" + " only applies to top level class", type);
        }

        checkModifiersIfNested(type);

        XposedHookInfo xposedHookInfo = new XposedHookInfo(
                type.toString(),
                annotation.targetSdkVersion(),
                annotation.active(),
                annotation.priority());

        Logger.debug("XposedHook process: " + xposedHookInfo);
        if (xposedHookInfo.isActive()) {
            hooks.add(xposedHookInfo);
        }
    }
Created by guohao4 on 2017/9/6.
Email: Tornaco@163.com
android/annotation_processors/xposed_hook_compiler/src/main/java/github/tornaco/permission/compiler/XposedHookCompiler.java