code: public void forAllComponents(ComponentVisitor visitor, long componentType) {
          synchronized (mComponents)
          {
              GVRComponent comp = getComponent(componentType);
              if ((comp != null) && !visitor.visit(comp))
              {
                  return;
              }
          }
          synchronized (mChildren)
          {
              for (int i = 0; i < mChildren.size(); ++i)
              {
                  GVRSceneObject child = mChildren.get(i);
                  child.forAllComponents(visitor, componentType);
              }
          }
      }
docs: Visits all the components of the specified type attached to
  the descendants of this scene object.
  The ComponentVisitor.visit function is called for every
  eligible component of each descendant until it returns false.
  This allows you to traverse the scene graph safely without copying it.
  This method gives much better performance than iterating
  children() or getChildren().
  
  @param visitor ComponentVisitor interface implementing "visit" function
  @param componentType type of component to find
  
  @see #children()
  @see #getChildren()
  @see SceneVisitor
  @see #forAllDescendants(SceneVisitor)
  @see #getComponent(long)