Examples of Visitor


Examples of com.ardor3d.scenegraph.visitor.Visitor

     *            the root node on the scenegraph
     * @param doUpdate
     *            if true, skinned mesh objects will automatically update their model bounds when applying pose.
     */
    public static void setAutoUpdateBounds(final Spatial root, final boolean doUpdate) {
        root.acceptVisitor(new Visitor() {
            public void visit(final Spatial spatial) {
                // we only care about SkinnedMesh
                if (spatial instanceof SkinnedMesh) {
                    ((SkinnedMesh) spatial).setAutoUpdateSkinBounds(doUpdate);
                }
View Full Code Here

Examples of com.ateam.webstore.ui.models.Visitor

//    }
//    else {
//      title = "All Orders";
//      olv.setOrders(service.getAll()); 
//    }
    Visitor v = (Visitor) req.getSession().getAttribute(SESSION_ATTRIBUTE_VISITOR);
    title = "All Orders";
    olv.setOrders(service.getByCustomerId(v.getCustomer().getId()))
   
    olv.addContentView(new ContentView(JSP_ORDER_LIST, title));
    return olv;
  }
View Full Code Here

Examples of com.codecademy.eventhub.storage.visitor.Visitor

  public Visitor getFilterVisitor(final int userId) {
    return new DelayedVisitorProxy(new Provider<Visitor>() {
      @Override
      public Visitor get() {
        final BloomFilter bloomFilter = bloomFilterDmaList.get(userId);
        final Visitor visitorFromSuper = BloomFilteredUserStorage.super.getFilterVisitor(userId);
        numConditionCheck++;
        return new BloomFilteredFilterVisitor(bloomFilter, visitorFromSuper);
      }
    });
  }
View Full Code Here

Examples of com.google.caja.parser.Visitor

   * @param importRewriter to rewrite links to sanitizing proxy
   * @param imageRewriter to rewrite links to the sanitizing proxy
   */
  public void sanitize(CssTree css, final Uri linkContext, final LinkRewriter importRewriter,
      final LinkRewriter imageRewriter) {
    css.acceptPreOrder(new Visitor() {
      public boolean visit(AncestorChain<?> ancestorChain) {
        if (ancestorChain.node instanceof CssTree.Property) {
          if (!schema.isPropertyAllowed(((CssTree.Property) ancestorChain.node).
              getPropertyName())) {
            // Remove offending property
View Full Code Here

Examples of com.google.caja.parser.Visitor

  /**
   * Get all descendants of the passed node with the specified node type
   */
  public static <T extends CssTree> List<T> descendants(CssTree node, final Class<T> nodeType) {
    final List<T> descendants = Lists.newArrayList();
    node.acceptPreOrder(new Visitor() {
      public boolean visit(AncestorChain<?> ancestorChain) {
        if (nodeType.isAssignableFrom(ancestorChain.node.getClass())) {
          descendants.add(nodeType.cast(ancestorChain.node));
        }
        return true;
View Full Code Here

Examples of com.google.caja.parser.Visitor

   * @param importRewriter to rewrite links to sanitizing proxy
   * @param imageRewriter to rewrite links to the sanitizing proxy
   */
  public void sanitize(CssTree css, final Uri linkContext, final LinkRewriter importRewriter,
      final LinkRewriter imageRewriter) {
    css.acceptPreOrder(new Visitor() {
      public boolean visit(AncestorChain<?> ancestorChain) {
        if (ancestorChain.node instanceof CssTree.Property) {
          if (!schema.isPropertyAllowed(((CssTree.Property) ancestorChain.node).
              getPropertyName())) {
            // Remove offending property
View Full Code Here

Examples of com.google.caja.parser.Visitor

      throw new SomethingWidgyHappenedError(msg, ex);
    }
  }

  private static Statement stripBlocks(Block b) {
    b.acceptPostOrder(new Visitor() {
      public boolean visit(AncestorChain<?> chain) {
        if (chain.node instanceof Block && chain.parent != null) {
          Block b = chain.cast(Block.class).node;
          List<? extends Statement> children = b.children();
          switch (children.size()) {
View Full Code Here

Examples of com.google.caja.parser.Visitor

  }

  private static void optimizeWithin(FunctionConstructor fc) {
    final Map<LitVal, LitVal> uses = Maps.newLinkedHashMap();
    Block body = fc.getBody();
    body.acceptPreOrder(new Visitor() {
      public boolean visit(AncestorChain<?> chain) {
        if (chain.node instanceof Literal
            && !(chain.node instanceof RegexpLiteral)) {
          AncestorChain<Literal> litAc = chain.cast(Literal.class);
          LitVal key = new LitVal(litAc);
View Full Code Here

Examples of com.google.caja.parser.Visitor

      propertiesAllowed.add(Name.css(k));
    }

    // Examine the property signatures and extract a list of keywords
    for (CssPropertyInfo pi : properties.values()) {
      pi.sig.acceptPreOrder(new Visitor() {
        public boolean visit(AncestorChain<?> ancestors) {
          ParseTreeNode n = ancestors.node;
          if (n instanceof CssPropertySignature.LiteralSignature) {
            String kw = ((CssPropertySignature.LiteralSignature) n).value;
            keywords.add(Name.css(kw));
          }
          return true;
        }
      }, null);
    }
    for (SymbolInfo si : symbols.values()) {
      si.sig.acceptPreOrder(new Visitor() {
        public boolean visit(AncestorChain<?> ancestors) {
          ParseTreeNode n = ancestors.node;
          if (n instanceof CssPropertySignature.LiteralSignature) {
            String kw = ((CssPropertySignature.LiteralSignature) n).value;
            keywords.add(Name.css(kw));
View Full Code Here

Examples of com.google.caja.parser.Visitor

  private static void unvar(
      Block node, final Set<Identifier> removedIdents,
      final List<FunctionConstructor> inners) {
    final List<Pair<AncestorChain<Statement>, Statement>> changes
        = Lists.newArrayList();
    node.acceptPreOrder(new Visitor() {
      public boolean visit(AncestorChain<?> chain) {
        ParseTreeNode node = chain.node;
        if (node instanceof Declaration
            && !(node instanceof FunctionDeclaration)) {
          if (chain.parent.node instanceof CatchStmt) { 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.