Package org.springframework.beans.factory.parsing

Examples of org.springframework.beans.factory.parsing.ComponentDefinition


    ComponentDefinition[] nestedComponentDefs = compositeDef.getNestedComponents();
    assertEquals("Incorrect number of inner components", 2, nestedComponentDefs.length);
    AdvisorComponentDefinition acd = null;
    for (int i = 0; i < nestedComponentDefs.length; i++) {
      ComponentDefinition componentDefinition = nestedComponentDefs[i];
      if (componentDefinition instanceof AdvisorComponentDefinition) {
        acd = (AdvisorComponentDefinition) componentDefinition;
        break;
      }
    }
View Full Code Here


    ComponentDefinition[] nestedComponentDefs = compositeDef.getNestedComponents();
    assertEquals("Incorrect number of inner components", 2, nestedComponentDefs.length);
    AspectComponentDefinition acd = null;
    for (int i = 0; i < nestedComponentDefs.length; i++) {
      ComponentDefinition componentDefinition = nestedComponentDefs[i];
      if (componentDefinition instanceof AspectComponentDefinition) {
        acd = (AspectComponentDefinition) componentDefinition;
        break;
      }
    }
View Full Code Here

  @Test
  public void testSourceExtraction() {
    Iterator<ComponentDefinition> iterator = context.getRegisteredComponents();
    while (iterator.hasNext()) {
      ComponentDefinition compDef = iterator.next();
      assertNotNull("CompositeComponentDefinition '" + compDef.getName() + "' has no source attachment", compDef.getSource());
      validateComponentDefinition(compDef);
    }
  }
View Full Code Here

   * <p>
   */
  public BeanDefinition parse(Element element, ParserContext parserContext) {

    // Get a component definition for the given element.
    ComponentDefinition componentDefinition = parseElement(element, parserContext);

    if (componentDefinition != null) {
      if (componentDefinition instanceof BeanComponentDefinition) {
        parserContext.registerBeanComponent((BeanComponentDefinition) componentDefinition);
        // return the bean definition for the use within Spring
View Full Code Here

   * @return a {@link ComponentDefinition} created from the given element
   */
  private ComponentDefinition parseElement(Node element, ParserContext parserContext) {

    // Get - if any - the component for the given element.
    ComponentDefinition rootComponent = parseSingleElement(element, parserContext);

    List<ComponentDefinition> nestedComponents = new ArrayList<ComponentDefinition>();
    NodeList nestedElements = element.getChildNodes();
    for (int i = 0; i < nestedElements.getLength(); i++) {
      Node nestedElement = nestedElements.item(i);
      if (nestedElement.getNodeType() == Node.ELEMENT_NODE) {
        ComponentDefinition nestedComponent = parseElement(nestedElement, parserContext);
        if (nestedComponent != null) {
          nestedComponents.add(nestedComponent);
        }
      }
    }
View Full Code Here

            // If the XSD is not found this check will fail.
            if (result instanceof XSDElementDeclarationAdapter) {
              XSDElementDeclarationImpl elementDeclaration = (XSDElementDeclarationImpl) ((XSDElementDeclarationAdapter) result)
                  .getKey();

              ComponentDefinition componentDefinition = null;

              // 1. Get component definition for directly attached
              // annotations.
              if (elementDeclaration.getAnnotation() != null) {
                componentDefinition = processAnnotations(element,
View Full Code Here

TOP

Related Classes of org.springframework.beans.factory.parsing.ComponentDefinition

Copyright © 2018 www.massapicom. 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.