Examples of Analyzer


Examples of org.jberet.job.Analyzer

    private void resolve(Partition partition) {
        if (partition == null) {
            return;
        }
        String oldVal, newVal;
        Analyzer analyzer = partition.getAnalyzer();
        if (analyzer != null) {
            oldVal = analyzer.getRef();
            newVal = resolve(oldVal);
            if (!oldVal.equals(newVal)) {
                analyzer.setRef(newVal);
            }
            resolve(analyzer.getProperties(), true);
        }
        Collector collector = partition.getCollector();
        if (collector != null) {
            oldVal = collector.getRef();
            newVal = resolve(oldVal);
View Full Code Here

Examples of org.jboss.dna.graph.query.process.SelectComponent.Analyzer

            assert projectedColumns != null;
            assert !projectedColumns.isEmpty();
            columns = new QueryResultColumns(projectedColumns, context.getHints().hasFullTextSearch);

            // Go through the plan and create the corresponding ProcessingComponents ...
            Analyzer analyzer = createAnalyzer(context);
            ProcessingComponent component = createComponent(command, context, plan, columns, analyzer);
            long nanos2 = System.nanoTime();
            statistics = statistics.withResultsFormulationTime(nanos2 - nanos);
            nanos = nanos2;
View Full Code Here

Examples of org.jboss.forge.furnace.proxy.javassist.bytecode.analysis.Analyzer

        return frames[pos - offset]; // Adjust pos
    }

    private void initFrames(CtClass clazz, MethodInfo minfo) throws BadBytecode {
        if (frames == null) {
            frames = ((new Analyzer())).analyze(clazz, minfo);
            offset = 0; // start tracking changes
        }
    }
View Full Code Here

Examples of org.jvnet.sorcerer.Analyzer

    private void run() throws IOException, CmdLineException {
        if(debug)
            System.setProperty("sorcerer.debug","true");

        Analyzer a = new Analyzer();

        a.setProjectDir(projectDir);

        for (String f : files) {
            File file = new File(f);
            if(!file.exists())
                throw new CmdLineException("No such file nor directory exists: "+file);

            if(file.getName().equals(".classpath")) {
                a.parseDotClassPath(file.getAbsoluteFile().getParentFile());
                continue;
            }
            if(file.getName().endsWith(".ipr")) {
                a.parseIpr(file);
                continue;
            }

            if(file.isDirectory()) {
                if(auto)
                    autoScan(file,a);
                else
                    a.addSourceFolder(file);
            } else
                a.addSourceFile(file);
        }

        for (String path : paths) {
            StringTokenizer tokens = new StringTokenizer(path, File.pathSeparator);
            while(tokens.hasMoreTokens())
                a.addClasspath(new File(tokens.nextToken()));
        }

        for (String lib : jarpaths) {
            jarScan(new File(lib),a);
        }

        ParsedSourceSet pss = a.analyze(new DiagnosticPrinter());
        addDependency(pss.getDependencies());

        new FecruJSonGenerator(pss).generateAll(outDir);
//        new FrameSetGenerator(pss).generateAll(outDir);
    }
View Full Code Here

Examples of org.mitre.sim.analysis.instrument.Analyzer

   */
  private void performTriggerAnalysis() throws BuildException {
    try {
      Path destPath = new Path(this.getProject(), destdir.getAbsolutePath());
     
      Analyzer analyzer = new Analyzer(destPath.list(),
                                       classpath.list(),
                                        scratchdir,
                                        verboseTriggerAnalysis);

      analyzer.analyze();
    }
    catch (Throwable t) {
      throw new BuildException(t);
    }
  }
View Full Code Here

Examples of org.mockito.asm.tree.analysis.Analyzer

                ? null
                : Type.getObjectType(cn.superName);
        List methods = cn.methods;
        for (int i = 0; i < methods.size(); ++i) {
            MethodNode method = (MethodNode) methods.get(i);
            Analyzer a = new Analyzer(new SimpleVerifier(Type.getObjectType(cn.name),
                    syperType,
                    false));
            try {
                a.analyze(cn.name, method);
                if (!dump) {
                    continue;
                }
            } catch (Exception e) {
                e.printStackTrace(pw);
            }
            Frame[] frames = a.getFrames();

            TraceMethodVisitor mv = new TraceMethodVisitor();

            pw.println(method.name + method.desc);
            for (int j = 0; j < method.instructions.size(); ++j) {
View Full Code Here

Examples of org.moltools.apps.probemaker.design.Analyzer

        fnfx.printStackTrace();
        log = defaultLog;
      }
    }
           
    Analyzer analyzer = new Analyzer(project.getSettings(),acc,sel);   
   
    //setStatus(UITexts.getString("ProbeDesignTask.MESSAGE_READY"),0); //$NON-NLS-1$

    //Print some project and time info to the log
    log.begin(project.getName(), logFile == null ? "" : logFile.getName(), //$NON-NLS-1$
View Full Code Here

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

     * @param owner
     * @param meth
     * @param cl
     */
    private void analyzeMethod(final ClassLoader cl) {
        Analyzer a = new Analyzer(new SimpleVerifier() {

            protected Class getClass(final Type t) {
                try {
                    if (t.getSort() == Type.ARRAY) {
                        return Class.forName(t.getDescriptor().replace(
                            '/', '.'), true, cl);
                    }
                    return cl.loadClass(t.getClassName());
                } catch (ClassNotFoundException e) {
                    throw new RuntimeException(e.toString()+" " +cl, e);
                }
            }
        });
        try {
            a.analyze(owner, meth);
        } catch (AnalyzerException e) {
            error = e.getMessage();
            if (error.startsWith("Error at instruction ")) {
                error = error.substring("Error at instruction ".length());
                errorInsn = Integer.parseInt(error.substring(0, error
                    .indexOf(':')));
                error = error.substring(error.indexOf(':') + 2);
            } else {
                BytecodeOutlinePlugin.log(e, IStatus.ERROR);
                error = null;
            }
        }
        frames = a.getFrames();
    }
View Full Code Here

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

*/
public class CyclomaticComplexity {
 
  public int getCyclomaticComplexity(String owner, MethodNode mn)
      throws AnalyzerException {
    Analyzer a = new Analyzer(new BasicInterpreter()) {
      protected Frame newFrame(int nLocals, int nStack) {
        return new Node(nLocals, nStack);
      }

      protected Frame newFrame(Frame src) {
        return new Node(src);
      }

      protected void newControlFlowEdge(int src, int dst) {
        Node s = (Node) getFrames()[src];
        s.successors.add((Node) getFrames()[dst]);
      }
    };
    a.analyze(owner, mn);
    Frame[] frames = a.getFrames();
    int edges = 0;
    int nodes = 0;
    for (int i = 0; i < frames.length; ++i) {
      if (frames[i] != null) {
        edges += ((Node) frames[i]).successors.size();
View Full Code Here

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

    next = mv;
  }

  public void visitEnd() {
    MethodNode mn = (MethodNode) mv;
    Analyzer a = new Analyzer(new BasicInterpreter());
    try {
      a.analyze(owner, mn);
      Frame[] frames = a.getFrames();
      AbstractInsnNode[] insns = mn.instructions.toArray();
      for (int i = 0; i < frames.length; ++i) {
        if (frames[i] == null && !(insns[i] instanceof LabelNode)) {
          mn.instructions.remove(insns[i]);
        }
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.