Package com.dp4j

Examples of com.dp4j.Reflect


    @Override
    protected void processElement(Element e, TypeElement ann, boolean warningsOnly) {
        final String annName = ann.getQualifiedName().toString();

        if (annName.equals(Reflect.class.getCanonicalName())) {
            final Reflect reflect = e.getAnnotation(Reflect.class);
            catchExceptions = reflect.catchExceptions();
        } else if (annName.equals(Hack.class.getCanonicalName())) {
            catchExceptions = true;
        } else {
            catchExceptions = false;
        }

        if (options.containsKey("conservative")) {
            if (!annName.equals(Reflect.class.getCanonicalName())) {
                return;
            }
        }
        if (options.containsKey(rAll)) {
            reflectAll = true;
        }

        encClass = (TypeElement) e.getEnclosingElement();
        PackageElement packageOf = elementUtils.getPackageOf(e);
        List<? extends Element> pkgClasses = packageOf.getEnclosedElements();

        rs = new Resolver(elementUtils, trees, tm, encClass, typeUtils, symTable, pkgClasses);

        methTree = (JCMethodDecl) elementUtils.getTree(e);

        thisExp = tm.This((Type) encClass.asType());

        final TreePath treePath = trees.getPath(e);
        final CompilationUnitTree cut = treePath.getCompilationUnit();
        boolean reflectOnlyThis = false;
        if (!reflectAll) {
            if (annName.equals(Reflect.class.getCanonicalName())) {
                final Reflect refAnn = e.getAnnotation(Reflect.class);
                reflectOnlyThis = refAnn.all();
            }
        }
        if (reflectOnlyThis) {
            reflectAll = true;
        }
View Full Code Here

TOP

Related Classes of com.dp4j.Reflect

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.