Examples of ElementScanner


Examples of com.google.java.contract.core.util.ElementScanner

     */
    ArrayList<TypeModel> undecoratedTypes =
        new ArrayList<TypeModel>(roots.size());
    for (TypeElement r : roots) {
      TypeModel type = factory.createType(r, diagnosticManager);
      ElementScanner annotator =
          new ElementScanner() {
            @Override
            public void visitContractAnnotation(
                ContractAnnotationModel annotation) {
              if (annotation.isVirtual()
                  && knownTypeNames.contains(
View Full Code Here

Examples of org.jdom.contrib.input.scanner.ElementScanner

   public static void main(String[] args) throws Exception
   {
      org.jdom.contrib.input.scanner.XPathMatcher.setDebug(true);

      ElementScanner scanner = new ElementScanner();

      scanner.addElementListener(new Spy("Listener #1 - \"x//y\"")"x//y");
      scanner.addElementListener(new Spy("Listener #2 - \"y/*/y\""), "y/*/y");
      scanner.addElementListener(new Spy("Listener #3 - \"/*\""),    "/*");
      scanner.addElementListener(new Spy("Listener #4 - \"z\""),     "z");

      scanner.addElementListener(new Spy("Listener #5 - \"*[contains(@name,'.1')]\""),
                                                        "*[contains(@name,'.1')]");
      scanner.addElementListener(new Spy("Listener #6 - \"y[.//y]\""),
                                                        "y[.//y]");

      String input = "test.xml";
      if (args.length > 0)
      {
         input = args[0];
      }

      scanner.parse(new InputSource(input));
   }
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.