Examples of AnalyzerException


Examples of com.buschmais.jqassistant.core.analysis.api.AnalyzerException

                applyConcepts(ruleSet.getConcepts().values());
            } finally {
                reportWriter.end();
            }
        } catch (ReportWriterException e) {
            throw new AnalyzerException("Cannot write report.", e);
        }
    }
View Full Code Here

Examples of com.buschmais.jqassistant.core.analysis.api.AnalyzerException

            }
            store.commitTransaction();
            return new Result<T>(executable, queryResult.getColumns(), rows);
        } catch (RuntimeException e) {
            store.rollbackTransaction();
            throw new AnalyzerException("Cannot execute query: " + executable.getQuery(), e);
        } finally {
            IOUtils.closeQuietly(queryResult);
        }
    }
View Full Code Here

Examples of nginx.clojure.asm.tree.analysis.AnalyzerException

            Analyzer a = MethodDatabaseUtil.buildAnalyzer(db);
            this.frames = a.analyze(className, mn);
            this.lvarStack = mn.maxLocals;
            this.firstLocal = ((mn.access & Opcodes.ACC_STATIC) == Opcodes.ACC_STATIC) ? 0 : 1;
        } catch (UnsupportedOperationException ex) {
            throw new AnalyzerException(null, ex.getMessage(), ex);
        }
    }
View Full Code Here

Examples of nginx.clojure.asm.tree.analysis.AnalyzerException

            Analyzer a = MethodDatabaseUtil.buildAnalyzer(db);
            this.frames = a.analyze(className, mn);
            this.lvarCStack = mn.maxLocals+2;
            this.firstLocal = ((mn.access & Opcodes.ACC_STATIC) == Opcodes.ACC_STATIC) ? 0 : 1;
        } catch (UnsupportedOperationException ex) {
            throw new AnalyzerException(null, ex.getMessage(), ex);
        }
    }
View Full Code Here

Examples of nginx.clojure.asm.tree.analysis.AnalyzerException

    @Override
    public BasicValue binaryOperation(AbstractInsnNode insn, BasicValue value1, BasicValue value2) throws AnalyzerException {
        if(insn.getOpcode() == Opcodes.AALOAD) {
            Type t1 = value1.getType();
            if(t1 == null || t1.getSort() != Type.ARRAY) {
                throw new AnalyzerException(insn, "AALOAD needs an array as first parameter");
            }
           
            Type resultType = Type.getType(t1.getDescriptor().substring(1));
            return new BasicValue(resultType);
        }
View Full Code Here

Examples of org.objectweb.asm.tree.analysis.AnalyzerException

            else if (val instanceof Float)
               return new ConstantValue.FloatConstant(((Float)val).floatValue());
            else if (val instanceof Double)
               return new ConstantValue.DoubleConstant(((Double)val).doubleValue());
            else
               throw new AnalyzerException(insn, "Unhandled bytecode instruction");
         }
         case NEW:
         {
            assert(insn instanceof TypeInsnNode);
            TypeInsnNode typeInsn = (TypeInsnNode)insn;
            String className = typeInsn.desc;
            return new TypedValue.NewValue(className);
         }
         case BIPUSH:
         case SIPUSH:
         {
            assert(insn instanceof IntInsnNode);
            IntInsnNode intInsn = (IntInsnNode)insn;
            return new ConstantValue.IntegerConstant(intInsn.operand);
         }
         case JSR:
         case GETSTATIC:
         default:
            throw new AnalyzerException(insn, "Unhandled bytecode instruction");
      }
   }
View Full Code Here

Examples of org.objectweb.asm.tree.analysis.AnalyzerException

         case ATHROW:
         case INSTANCEOF:
         case MONITORENTER:
         case MONITOREXIT:
         default:
            throw new AnalyzerException(insn, "Unhandled bytecode instruction");
      }
   }
View Full Code Here

Examples of org.objectweb.asm.tree.analysis.AnalyzerException

         case FCMPG:
         case DCMPL:
         case DCMPG:
         case PUTFIELD:
         default:
            throw new AnalyzerException(insn, "Unhandled bytecode instruction");
      }
   }
View Full Code Here

Examples of org.objectweb.asm.tree.analysis.AnalyzerException

         case AASTORE:
         case BASTORE:
         case CASTORE:
         case SASTORE:
         default:
            throw new AnalyzerException(insn, "Unhandled bytecode instruction");
      }
   }
View Full Code Here

Examples of org.objectweb.asm.tree.analysis.AnalyzerException

            MethodSignature sig = new MethodSignature(methodInsn.owner, methodInsn.name, methodInsn.desc);
            if (isVirtualCall)
            {
               TypedValue base = (TypedValue)values.get(0);
               if (methodChecker != null && !methodChecker.isMethodSafe(sig, base, args))
                  throw new AnalyzerException(insn, "Unknown method " + sig + " encountered");
               MethodCallValue.VirtualMethodCallValue toReturn;
               toReturn = new MethodCallValue.VirtualMethodCallValue(methodInsn.owner, methodInsn.name, methodInsn.desc, args, base);
               if (toReturn.isConstructor() && linkedFrame != null)
                  linkedFrame.replaceValues(base, toReturn);
               return toReturn;
            }
            else
            {
               if (methodChecker != null && !methodChecker.isStaticMethodSafe(sig))
                  throw new AnalyzerException(insn, "Unknown method " + sig + " encountered");
               return new MethodCallValue.StaticMethodCallValue(methodInsn.owner, methodInsn.name, methodInsn.desc, args);
            }
         }
         case INVOKEDYNAMIC:
         {
            assert(insn instanceof InvokeDynamicInsnNode);
            InvokeDynamicInsnNode invokeInsn = (InvokeDynamicInsnNode)insn;
            if (!"java/lang/invoke/LambdaMetafactory".equals(invokeInsn.bsm.getOwner())
                  || !"altMetafactory".equals(invokeInsn.bsm.getName())
                  || !"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;".equals(invokeInsn.bsm.getDesc()))
               throw new AnalyzerException(insn, "Unknown invokedynamic " + invokeInsn.bsm + " encountered");
            // Return the Lambda creation result
            Handle lambdaMethod = (Handle)invokeInsn.bsmArgs[1];
            Type functionalInterface = Type.getReturnType(invokeInsn.desc);
            return new LambdaFactory(functionalInterface, lambdaMethod);
         }
         case MULTIANEWARRAY:
         default:
            throw new AnalyzerException(insn, "Unhandled bytecode instruction");
      }
   }
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.