Package com.dp4j

Examples of com.dp4j.Singleton


        final String enclosingClass = singleton.toString();
        if (!returnClass.equals(enclosingClass)) {
            msgr.printMessage(Kind.ERROR, "the instance field must be of type " + enclosingClass, e);
        }

        final Singleton singletonAnn = singleton.getAnnotation(Singleton.class);
        if (singletonAnn == null) {
            if (singletonAnn.lazy()) {
                VariableTree tree = (VariableTree) trees.getTree(e);
                ExpressionTree initializer = tree.getInitializer();
                if (initializer != null) {
                    msgr.printMessage(Kind.ERROR, "For lazy Singleton initialization you must not inline initialize " + e.getSimpleName(), e);
                }
View Full Code Here


        final String enclosingClass = singleton.toString();
        if (!returnClass.contains(enclosingClass)) { //skip ()
            msgr.printMessage(Kind.ERROR, "the return type must be of type " + enclosingClass, e);
        }

        final Singleton singletonAnn = singleton.getAnnotation(Singleton.class);
        if (singletonAnn == null) {
            new SingletonProcessor().processElement(singleton, ann, true);
            //TODO: figure out if successful processing and if so report that it's indeed a Singleton and should be so annotated.
//            msgr.printMessage(Kind.WARNING, "enclosing class should be annotated with Singleton", e);
View Full Code Here

        final String enclosingClass = singleton.toString();
        if (!returnClass.equals(enclosingClass)) {
            msgr.printMessage(Kind.ERROR, "the instance field must be of type " + enclosingClass, e);
        }

        final Singleton singletonAnn = singleton.getAnnotation(Singleton.class);
        if (singletonAnn == null) {
            new SingletonProcessor().processElement(singleton, ann, true);
            //TODO: figure out if successful processing and if so report that it's indeed a Singleton and should be so annotated.
//            msgr.printMessage(Kind.WARNING, "enclosing class should be annotated with Singleton", e);
        }
View Full Code Here

        final String enclosingClass = singleton.toString();
        if (!returnClass.contains(enclosingClass)) { //skip ()
            msgr.printMessage(Kind.ERROR, "the return type must be of type " + enclosingClass, e);
        }

        final Singleton singletonAnn = singleton.getAnnotation(Singleton.class);
        if (singletonAnn == null) {
            new SingletonProcessor().processElement(singleton, ann, true);
            //TODO: figure out if successful processing and if so report that it's indeed a Singleton and should be so annotated.
//            msgr.printMessage(Kind.WARNING, "enclosing class should be annotated with Singleton", e);
View Full Code Here

TOP

Related Classes of com.dp4j.Singleton

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.