Examples of JirNodeInfo


Examples of org.jmlspecs.jir.ast.JirNodeInfo

    }

    protected String getMethodBinarySignature(HashMap<String, JirMethodInfo> possibleMethodInfos, int lineNumber) {
        String methodSignature = null;
        JirMethodSpec methodSpec = null;
        JirNodeInfo nodeInfo = null;
        int currentMinDifference = 0;
        for(String methodInfoKey: possibleMethodInfos.keySet()) {
            if(nodeInfo == null) {
                methodSpec = possibleMethodInfos.get(methodInfoKey).getMethodSpec();
                if(methodSpec != null) {
                    nodeInfo = methodSpec.getInfo();
                    methodSignature = methodInfoKey;
                    currentMinDifference = Math.abs(lineNumber - nodeInfo.getEndLine());
                }
            }
            else {
                nodeInfo = possibleMethodInfos.get(methodInfoKey).getMethodSpec().getInfo();
                if((nodeInfo.getEndLine() <= lineNumber) && (Math.abs(lineNumber - nodeInfo.getEndLine()) < currentMinDifference)){
                    methodSignature = methodInfoKey;
                    currentMinDifference = Math.abs(lineNumber - nodeInfo.getEndLine());
                }
            }
        }
        return methodSignature;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.