Examples of BooleanBlockWithNodeArg


Examples of net.sf.jcontracts.dependencyanalyzer.BooleanBlockWithNodeArg

            if (outputOption != null)
            {
                if (allOption != null)
                {
                    log.info("unconditionally instrumenting all files (-a).");
                    dep = dependencyGraph.getFileDependencyTable(new BooleanBlockWithNodeArg()
                    {

                        public boolean eval(Node n)
                        {
                            return true;
                        }

                    });
                }
                else
                {
                    dep = dependencyGraph.getFileDependencyTable(new BooleanBlockWithNodeArg()
                    {

                        public boolean eval(Node n)
                        {
                            boolean needsUpdate = false;
                            if (!n.getFilename().equals("???"))
                            {
                                String fon = "";
                                try
                                {
                                    fon = outputOption.getOutputFileName(n.getFilename(), n.getPackagename());
                                }
                                catch (IOException e)
                                {
                                    throw new RuntimeException("File " + n.getFilename()
                                            + " got deleted although the last check indicated its presence."
                                            + e.toString());
                                }
                                File fo = new File(fon);
                                File fcmc = new File(n.getFilename());
                                if (fo.lastModified() <= fcmc.lastModified())
                                {
                                    needsUpdate = true;
                                    log.info("**Java Contract Suite:INFO " + fon + " needs to be updated based on "
                                            + n.getFilename());
                                }
                                else
                                {
                                    log.info("**Java Contract Suite:INFO " + fon + " up to date.");
                                }
                                if (!needsUpdate)
                                {
                                    log.info("instrumented " + n.getName() + " (" + fon + ") is up to date.");
                                }
                            }
                            return needsUpdate;
                        }

                    });
                }
            }
            else
            {
                dep = dependencyGraph.getFileDependencyTable(new BooleanBlockWithNodeArg()
                {

                    public boolean eval(Node n)
                    {
                        return true;
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.