Return an object which contains info about the UIComponent type
of each node in the view tree. This allows an identical UIComponent
tree to be recreated later, though all the components will have
just default values for their members.
489208
@Override
    protected Object getTreeStructureToSave(FacesContext facesContext)
    {
        if (log.isLoggable(Level.FINEST))
        {
            log.finest("Entering getTreeStructureToSave");
        }
        UIViewRoot viewRoot = facesContext.getViewRoot();
        if (viewRoot.isTransient())
        {
            return null;
        }
        TreeStructureManager tsm = new TreeStructureManager();
        Object retVal = tsm.buildTreeStructureToSave(viewRoot);
        if (log.isLoggable(Level.FINEST))
        {
            log.finest("Exiting getTreeStructureToSave");
        }
        return retVal;
    }
749597
static TypeName arrayComponent(TypeName type) {
    return type instanceof ArrayTypeName
        ? ((ArrayTypeName) type).componentType
        : null;
  }
1250493
def component(name)
      components.each { |c| return c if c.name == name.to_sym }
      return nil
    end
514427
public ResolvableType getComponentType() {
        if (this == NONE) {
            return NONE;
        }
        if (this.componentType != null) {
            return this.componentType;
        }
        if (this.type instanceof Class) {
            Class<?> componentType = ((Class<?>) this.type).getComponentType();
            return forType(componentType, this.variableResolver);
        }
        if (this.type instanceof GenericArrayType) {
            return forType(((GenericArrayType) this.type).getGenericComponentType(), this.variableResolver);
        }
        return resolveType().getComponentType();
    }
214806
public static UIViewRoot getViewRoot(FaceletContext ctx, UIComponent parent)
    {
        UIComponent c = parent;
        do
        {
            if (c instanceof UIViewRoot)
            {
                return (UIViewRoot) c;
            }
            else
            {
                c = c.getParent();
            }
        } while (c != null);

        UIViewRoot root = ctx.getFacesContext().getViewRoot();
        if (root == null)
        {
            root = FaceletCompositionContext.getCurrentInstance(ctx).getViewRoot(ctx.getFacesContext());
        }
        return root;
    }
629594
function getElementType (node) {
  if (utils.isCustomComponent(node)) {
    return ELEMENT_TYPE.COMPONENT
  }
  if (utils.isHtmlElementNode(node)) {
    if (utils.isHtmlVoidElementName(node.name)) {
      return ELEMENT_TYPE.VOID
    }
    return ELEMENT_TYPE.NORMAL
  }
  if (utils.isSvgElementNode(node)) {
    return ELEMENT_TYPE.SVG
  }
  if (utils.isMathMLElementNode(node)) {
    return ELEMENT_TYPE.MATH
  }
  return 'unknown elements'
}
1055096
def get_tree_info(decision_tree,
                  feature_names=None,
                  **export_graphviz_kwargs):
    # type: (...) -> TreeInfo
    
    return TreeInfo(
        criterion=decision_tree.criterion,
        tree=_get_root_node_info(decision_tree, feature_names),
        graphviz=tree2dot(decision_tree,
                          feature_names=feature_names,
                          **export_graphviz_kwargs),
        is_classification=isinstance(decision_tree, ClassifierMixin),
    )
1306192
private final UIComponent createComponent(FacesContext facesContext, 
            final String componentType) throws FacesException
    {
        checkNull(componentType, "componentType");
        checkEmpty(componentType, "componentType");

        final Class<? extends UIComponent> componentClass =
                getObjectFromClassMap(componentType, _componentClassMap);
        if (componentClass == null)
        {
            log.log(Level.SEVERE, "Undefined component type " + componentType);
            throw new FacesException("Undefined component type " + componentType);
        }

        try
        {
            UIComponent component = componentClass.newInstance();
            _handleAnnotations(facesContext, component, component);
            return component;
        }
        catch (Exception e)
        {
            log.log(Level.SEVERE, "Could not instantiate component componentType = " + componentType, e);
            throw new FacesException("Could not instantiate component componentType = " + componentType, e);
        }
    }
1143908
function getComponent(aType) {
      var ucname = aType.toUpperCase();
      return (ucname in this.parts ? this.parts[ucname].slice() : []);
    }
1234104
function detectComponent (node) {
  const components = []
  if (node.children) {
    node.children.forEach(child => {
      if (child.type === 'VElement') {
        components.push(child)
      }
    })
  }
  return components
}
600523
protected ComponentModel getComponentModel() {
		UIContext effectiveContext = UIContextHolder.getCurrent();

		if (effectiveContext == null) {
			return sharedModel;
		} else {
			ComponentModel model = (ComponentModel) effectiveContext.getModel(this);

			if (model == null) {
				return sharedModel;
			} else if (model.getSharedModel() == null) {
				// The reference to the sharedModel has disappeared,
				// probably due to session serialization
				model.setSharedModel(sharedModel);
			}

			return model;
		}
	}
222870
function Component (props) {
  this._parent = null
  this._collector = { refs: [], components: [] }

  /**
   * > Contains all component properties and children. <br>
   * > Do not modify it directly, but recreate a new component using `cloneElement` instead
   * @type {object}
   * @category Properties
   */
  this.props = props || {}

  /**
   * > HTMLElement used as "base" for the component instance. Can also be an array of elements if `template` return an array.
   * @type {(VNode|HTMLElement|array)}
   * @category Properties
   */
  this.base = null

  /**
   * Set to true when component is mounted
   * @type {boolean}
   * @category Properties
   */
  this.mounted = false
}
836047
public static UIForm getClosestForm(UIComponent component) {
		while (component != null) {
			if (component instanceof UIForm) {
				return (UIForm) component;
			}
			component = component.getParent();
		}
		return null;
	}
610723
function (subview) {
            subview = (subview instanceof View === true) ? subview : this.get(subview);
            return subview._subviewtype;
        }
866697
def visitComponent_def(self, ctx:SystemRDLParser.Component_defContext):
        

        # Get definition. Returns Component
        if ctx.component_anon_def() is not None:
            comp_def = self.visit(ctx.component_anon_def())
        elif ctx.component_named_def() is not None:
            comp_def = self.visit(ctx.component_named_def())
        else:
            raise RuntimeError

        comp_def.parent_scope = self.component

        if ctx.component_insts() is not None:
            if isinstance(self, RootVisitor) and isinstance(comp_def, comp.Addrmap):
                self.msg.warning(
                    "Non-standard instantiation of an addrmap in root namespace will be ignored",
                    SourceRef.from_antlr(ctx.component_insts().component_inst(0).ID())
                )
            else:
                # Component is instantiated one or more times
                if ctx.component_inst_type() is not None:
                    inst_type = self.visit(ctx.component_inst_type())
                else:
                    inst_type = None

                # Pass some temporary info to visitComponent_insts
                self._tmp = (comp_def, inst_type, None)
                self.visit(ctx.component_insts())

        return None
518706
public static <T, C> ObjectArrayTypeInfo<T, C> getInfoFor(Type type, TypeInformation<C> componentInfo) {
		
		// generic array type e.g. for Tuples
		if (type instanceof GenericArrayType) {
			GenericArrayType genericArray = (GenericArrayType) type;
			return new ObjectArrayTypeInfo<T, C>(type, genericArray.getGenericComponentType(), componentInfo);
		}
		// for tuples without generics (e.g. generated by the TypeInformation parser)
		else if (type instanceof Class<?> && ((Class<?>) type).isArray() && Tuple.class.isAssignableFrom(((Class<?>) type).getComponentType())
				&& type != Tuple.class) {
			return new ObjectArrayTypeInfo<T, C>(type, ((Class<?>) type).getComponentType(), componentInfo);
		}
		return getInfoFor(type);
	}
1258371
public static Class getInnerComponentType( Class type ) {
      if( !type.isArray() ){
         return type;
      }
      return getInnerComponentType( type.getComponentType() );
   }