Examples of ComponentDefinition


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

    ComponentDefinition component = this.eventListener.getComponentDefinition("simpleLocalEjb");
    assertTrue(component instanceof BeanComponentDefinition);
  }

  public void testRemoteSlsbComponentEventReceived() {
    ComponentDefinition component = this.eventListener.getComponentDefinition("simpleRemoteEjb");
    assertTrue(component instanceof BeanComponentDefinition);
  }
View Full Code Here

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

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

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

    ComponentDefinition[] nestedComponentDefs = compositeDef.getNestedComponents();
    assertEquals("Incorrect number of inner components", 3, 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

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

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

    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

Examples of org.zkoss.zk.ui.metainfo.ComponentDefinition

  }
  public ComponentDefinitionMap getComponentDefinitionMap() {
    return _compdefs;
  }
  public ComponentDefinition getComponentDefinition(String name, boolean recurse) {
    final ComponentDefinition compdef = _compdefs.get(name);
    if (!recurse || compdef != null)
      return compdef;

    try {
      return _langdef.getComponentDefinition(name);
View Full Code Here

Examples of org.zkoss.zk.ui.metainfo.ComponentDefinition

    } catch (DefinitionNotFoundException ex) {
    }
    return null;
  }
  public ComponentDefinition getComponentDefinition(Class cls, boolean recurse) {
    final ComponentDefinition compdef = _compdefs.get(cls);
    if (!recurse || compdef != null)
      return compdef;

    try {
      return _langdef.getComponentDefinition(cls);
View Full Code Here

Examples of org.zkoss.zk.ui.metainfo.ComponentDefinition

    if (exec != null) {
      final ExecutionCtrl execCtrl = (ExecutionCtrl)exec;
      final PageDefinition pgdef = execCtrl.getCurrentPageDefinition();
      final Page page = execCtrl.getCurrentPage();

      final ComponentDefinition compdef =
        pgdef != null ? pgdef.getComponentDefinition(cls, true):
        page != null ?   page.getComponentDefinition(cls, true): null;
      if (compdef != null && compdef.getLanguageDefinition() != null)
        return compdef; //already from langdef (not from pgdef)

      final ComponentDefinition compdef2 =
        Components.getDefinitionByDeviceType(exec.getDesktop().getDeviceType(), cls);
      return compdef != null && (compdef2 == null ||
      !Objects.equals(compdef.getImplementationClass(), compdef2.getImplementationClass())) ?
        compdef: compdef2; //Feature 2816083: use compdef2 if same class
    }

    for (Iterator it = LanguageDefinition.getDeviceTypes().iterator(); it.hasNext();) {
      final ComponentDefinition compdef =
        Components.getDefinitionByDeviceType((String)it.next(), cls);
      if (compdef != null)
        return compdef;
    }
    return null;
View Full Code Here

Examples of org.zkoss.zk.ui.metainfo.ComponentDefinition

  getDefinitionByDeviceType(String deviceType, String name) {
    for (Iterator it = LanguageDefinition.getByDeviceType(deviceType).iterator();
    it.hasNext();) {
      final LanguageDefinition ld = (LanguageDefinition)it.next();
      try {
        final ComponentDefinition def = ld.getComponentDefinition(name);
        if (def.isInstance(this))
          return def;
      } catch (DefinitionNotFoundException ex) { //ignore
      }
    }
    return null;
View Full Code Here

Examples of org.zkoss.zk.ui.metainfo.ComponentDefinition

    if (exec != null) {
      final ExecutionCtrl execCtrl = (ExecutionCtrl)exec;
      final PageDefinition pgdef = execCtrl.getCurrentPageDefinition();
      final Page page = execCtrl.getCurrentPage();

      ComponentDefinition compdef =
        pgdef != null ? pgdef.getComponentDefinition(name, true):
        page != null ?   page.getComponentDefinition(name, true): null;
      if (compdef == null)
        compdef = getDefinitionByDeviceType(exec.getDesktop().getDeviceType(), name);
      if (compdef != null) {
        setDefinition(compdef);
        return;
      }
    } else {
      for (Iterator it = LanguageDefinition.getDeviceTypes().iterator(); it.hasNext();) {
        final ComponentDefinition compdef =
          getDefinitionByDeviceType((String)it.next(), name);
        if (compdef != null) {
          setDefinition(compdef);
          return;
        }
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.