Package org.cx4a.rsense.typing

Examples of org.cx4a.rsense.typing.Template


        if (receiverType != null) {
            Method method = (Method) receiverType.searchMethod(name);
            if (method != null
                && (method.getVisibility() != Visibility.PRIVATE
                    || vertex.hasPrivateVisibility())) {
                Template template = method.getTemplate(attr);
                if (template == null) {
                    template = createTemplate(graph, vertex, name, method, attr);
                    Logger.debug(SourceLocation.of(vertex), "template created: %s", method);
                } else {
                    template.reproduceSideEffect(graph, receiver, args, vertex.getBlock());
                    Logger.debug(SourceLocation.of(vertex), "template reused: %s", method);
                }
                return template.getReturnVertex();
            }
        }
        return null;
    }
View Full Code Here


        Block block = attr.getBlock();
        Scope scope = new LocalScope(method.getModule());
        context.pushFrame(context.getFrameModule(), name, receiver, block, Visibility.PUBLIC);
        context.pushScope(scope);

        Template template = new Template(method, context.getCurrentFrame(), scope, attr);
        method.addTemplate(attr, template);

        Vertex returnVertex = template.getReturnVertex();
        setFrameTemplate(context.getCurrentFrame(), template);

        AnnotationResolver.Result result = AnnotationHelper.resolveMethodAnnotation(graph, template);
        if (result == AnnotationResolver.Result.UNRESOLVED) {
            Logger.warn(SourceLocation.of(vertex), "annotation unmatched: %s", method);
View Full Code Here

TOP

Related Classes of org.cx4a.rsense.typing.Template

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.