Examples of parameterSignatureIterator()


Examples of edu.umd.cs.findbugs.ba.SignatureParser.parameterSignatureIterator()

        }
        if ((seen == INVOKESTATIC || seen == INVOKEVIRTUAL || seen == INVOKESPECIAL || seen == INVOKEINTERFACE)
                && getSigConstantOperand().indexOf("Ljava/lang/Runnable;") >= 0) {
            SignatureParser parser = new SignatureParser(getSigConstantOperand());
            int count = 0;
            for (Iterator<String> i = parser.parameterSignatureIterator(); i.hasNext(); count++) {
                String parameter = i.next();
                if (parameter.equals("Ljava/lang/Runnable;")) {
                    OpcodeStack.Item item = stack.getStackItem(parser.getNumParameters() - 1 - count);
                    if ("Ljava/lang/Thread;".equals(item.getSignature())) {
                        accumulator.accumulateBug(new BugInstance(this, "DMI_THREAD_PASSED_WHERE_RUNNABLE_EXPECTED",
View Full Code Here

Examples of edu.umd.cs.findbugs.ba.SignatureParser.parameterSignatureIterator()

                            TypeFrame factAtLocation = null;
                            SignatureParser sigParser = new SignatureParser(signature);
                            //                        int startIndex = 0;
                            //                        if (!xmethod.isStatic())
                            //                            startIndex = 1;
                            Iterator<String> signatureIterator = sigParser.parameterSignatureIterator();
                            int parameters = sigParser.getNumParameters();
                            for (int i = 0; i < parameters; i++) {
                                String sig = signatureIterator.next();
                                Collection<ClassDescriptor> annotations = invokedMethod.getParameterAnnotationDescriptors(i);
                                if (annotations.contains(WILL_CLOSE) || sig.equals("Ljava/io/Closeable;") || methodName.startsWith("close")) {
View Full Code Here

Examples of edu.umd.cs.findbugs.ba.SignatureParser.parameterSignatureIterator()

     */
    @Override
    public String[] analyze(IAnalysisCache analysisCache, MethodDescriptor descriptor) throws CheckedAnalysisException {
        SignatureParser parser = new SignatureParser(descriptor.getSignature());
        ArrayList<String> resultList = new ArrayList<String>();
        for (Iterator<String> i = parser.parameterSignatureIterator(); i.hasNext();) {
            resultList.add(i.next());
        }
        return resultList.toArray(new String[resultList.size()]);
    }
}
View Full Code Here

Examples of edu.umd.cs.findbugs.ba.SignatureParser.parameterSignatureIterator()

        XMethod called = XFactory.createXMethod(inv, constantPool);
        SignatureParser sigParser = new SignatureParser(called.getSignature());
        int numParams = sigParser.getNumParameters();

        Set<ValueNumber> result = new HashSet<ValueNumber>();
        Iterator<String> parameterIterator = sigParser.parameterSignatureIterator();
        for (int i = 0; i < numParams; i++) {
            String parameterSignature = parameterIterator.next();
            char firstChar = parameterSignature.charAt(0);
            if (firstChar != 'L' && firstChar != '[') {
                continue;
View Full Code Here

Examples of edu.umd.cs.findbugs.ba.SignatureParser.parameterSignatureIterator()

        StringBuilder buf = new StringBuilder();

        buf.append('(');

        SignatureParser parser = new SignatureParser(signature);
        for (Iterator<String> i = parser.parameterSignatureIterator(); i.hasNext();) {
            String param = i.next();
            param = transformSignature(param);
            buf.append(param);
        }
View Full Code Here

Examples of edu.umd.cs.findbugs.ba.SignatureParser.parameterSignatureIterator()

            SignatureParser parser = new SignatureParser(methodSignature);

            StringBuilder buf = new StringBuilder();

            buf.append('(');
            for (Iterator<String> i = parser.parameterSignatureIterator(); i.hasNext();) {
                buf.append(rewriteSignature(classNameRewriter, i.next()));
            }

            buf.append(')');
            buf.append(rewriteSignature(classNameRewriter, parser.getReturnTypeSignature()));
View Full Code Here

Examples of edu.umd.cs.findbugs.ba.SignatureParser.parameterSignatureIterator()

    static boolean compatibleParameters(String signature, String superSignature) {
        SignatureParser sig = new SignatureParser(signature);
        SignatureParser superSig = new SignatureParser(superSignature);
        if (sig.getNumParameters() == superSig.getNumParameters()) {
            Iterator<String> params = sig.parameterSignatureIterator();
            Iterator<String> superParams = superSig.parameterSignatureIterator();
            while (params.hasNext()) {
                String param = params.next();
                String superParam = superParams.next();
                if (areRelated(param, superParam)) {
                    continue;
View Full Code Here

Examples of edu.umd.cs.findbugs.ba.SignatureParser.parameterSignatureIterator()

            int startIndex = 0;
            if (!method.isStatic()) {
                startIndex = 1;
            }
            SignatureParser parser = new SignatureParser(method.getSignature());
            Iterator<String> signatureIterator = parser.parameterSignatureIterator();
            for (int i = startIndex; i < localsThatAreParameters + startIndex; i++) {
                String sig = signatureIterator.next();
                if (!liveStoreSetAtEntry.get(i) && signature.equals(sig)) {
                    // parameter isn't live and signatures match
                    LocalVariableAnnotation potentialMatch = LocalVariableAnnotation.getLocalVariableAnnotation(method, i, 0, 0);
View Full Code Here

Examples of edu.umd.cs.findbugs.ba.SignatureParser.parameterSignatureIterator()

        int startIndex = 0;
        if (!method.isStatic()) {
            startIndex = 1;
        }
        SignatureParser parser = new SignatureParser(method.getSignature());
        Iterator<String> signatureIterator = parser.parameterSignatureIterator();
        int lowestCost = Integer.MAX_VALUE;
        for (int i = startIndex; i < localsThatAreParameters + startIndex; i++) {
            String sig = signatureIterator.next();
            if (signature.equals(sig)) {
                LocalVariableAnnotation potentialMatch = LocalVariableAnnotation.getLocalVariableAnnotation(method, i, 0, 0);
View Full Code Here

Examples of edu.umd.cs.findbugs.ba.SignatureParser.parameterSignatureIterator()

    }

    public static String hashMethodSignature(String signature) {
        SignatureParser parser = new SignatureParser(signature);
        StringBuilder buf = new StringBuilder("(");
        for (Iterator<String> i = parser.parameterSignatureIterator(); i.hasNext();) {
            String param = i.next();
            buf.append(hashSignature(param));
        }
        buf.append(")");
        buf.append(hashSignature(parser.getReturnTypeSignature()));
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.