Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.gemini.blueprint.config.internal
Class AbstractReferenceDefinitionParser

    java.lang.Object
      org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
          org.eclipse.gemini.blueprint.config.internal.AbstractReferenceDefinitionParser

All Implemented Interfaces:
  org.springframework.beans.factory.xml.BeanDefinitionParser

Direct Known Subclasses:
  CollectionBeanDefinitionParser, ReferenceBeanDefinitionParser

    public abstract class AbstractReferenceDefinitionParser

extends org.springframework.beans.factory.xml.AbstractBeanDefinitionParser

Base class for parsing reference declarations. Contains common functionality such as adding listeners (and their custom methods), interfaces, cardinality and so on.

Note: This parser also handles the cyclic injection between an importer and its listeners by breaking the chain by creating an adapter instead of the listener. The adapter will then do dependency lookup for the listener.

Author:
  Costin Leau

Field Summary
`static String` | `GENERATED_REF`
`static String` | `PROMOTED_REF`

Fields inherited from class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
`ID_ATTRIBUTE, NAME_ATTRIBUTE`

Constructor Summary
`AbstractReferenceDefinitionParser()`

Method Summary
`protected void` | `applyDefaultCardinality(org.springframework.beans.factory.support.BeanDefinitionBuilder builder, OsgiDefaultsDefinition defaults)` Apply default cardinality.
`protected void` | `applyDefaults(org.springframework.beans.factory.xml.ParserContext parserContext, OsgiDefaultsDefinition defaults, org.springframework.beans.factory.support.BeanDefinitionBuilder builder)`
`protected void` | `doParse(Element element, org.springframework.beans.factory.xml.ParserContext context, org.springframework.beans.factory.support.BeanDefinitionBuilder builder)`
`protected String` | `generateBeanName(String prefix, org.springframework.beans.factory.config.BeanDefinition def, org.springframework.beans.factory.xml.ParserContext parserContext)`
`protected abstract Class` | `getBeanClass(Element element)` Indicate the bean definition class for this element.
`protected String` | `getListenerElementName()`
`protected void` | `handleNestedDefinition(Element element, org.springframework.beans.factory.xml.ParserContext context, org.springframework.beans.factory.support.BeanDefinitionBuilder builder)` If the reference is a nested bean, make it a top-level bean if it's a mandatory dependency.
`protected void` | `parseAttributes(Element element, org.springframework.beans.factory.support.BeanDefinitionBuilder builder, AttributeCallback[] callbacks, OsgiDefaultsDefinition defaults)` Allow subclasses to add their own callbacks.
`protected void` | `parseInterfaces(Element parent, org.springframework.beans.factory.xml.ParserContext parserContext, org.springframework.beans.factory.support.BeanDefinitionBuilder builder)` Parse interfaces.
`protected org.springframework.beans.factory.support.AbstractBeanDefinition` | `parseInternal(Element element, org.springframework.beans.factory.xml.ParserContext parserContext)`
`protected void` | `parseListeners(Element element, String subElementName, org.springframework.beans.factory.xml.ParserContext context, org.springframework.beans.factory.support.BeanDefinitionBuilder builder)` Parse listeners.
`protected void` | `parseNestedElements(Element element, org.springframework.beans.factory.xml.ParserContext context, org.springframework.beans.factory.support.BeanDefinitionBuilder builder)` Parse nested elements.
`protected Set` | `parsePropertySetElement(org.springframework.beans.factory.xml.ParserContext context, Element beanDef, org.springframework.beans.factory.config.BeanDefinition beanDefinition)`
`protected Object` | `parsePropertySubElement(org.springframework.beans.factory.xml.ParserContext context, Element beanDef, org.springframework.beans.factory.config.BeanDefinition beanDefinition)`
`protected void` | `postProcessListenerDefinition(org.springframework.beans.factory.config.BeanDefinition wrapperDef)`
`protected OsgiDefaultsDefinition` | `resolveDefaults(Document document, org.springframework.beans.factory.xml.ParserContext parserContext)` Get OSGi defaults (in case they haven't been resolved).

Methods inherited from class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
`parse, postProcessComponentDefinition, registerBeanDefinition, resolveId, shouldFireEvents, shouldGenerateId, shouldGenerateIdAsFallback`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### GENERATED_REF

    public static final String GENERATED_REF

See Also:
  Constant Field Values

### PROMOTED_REF

    public static final String PROMOTED_REF

See Also:
  Constant Field Values

Constructor Detail

### AbstractReferenceDefinitionParser

    public AbstractReferenceDefinitionParser()

Method Detail

### resolveDefaults

    protected OsgiDefaultsDefinition resolveDefaults(Document document,
                                                     org.springframework.beans.factory.xml.ParserContext parserContext)

  Get OSGi defaults (in case they haven't been resolved).

  Parameters:
    `document` -
  Returns:

### parseInternal

    protected org.springframework.beans.factory.support.AbstractBeanDefinition parseInternal(Element element,
                                                                                             org.springframework.beans.factory.xml.ParserContext parserContext)

  Specified by:
    `parseInternal` in class `org.springframework.beans.factory.xml.AbstractBeanDefinitionParser`

### applyDefaults

    protected void applyDefaults(org.springframework.beans.factory.xml.ParserContext parserContext,
                                 OsgiDefaultsDefinition defaults,
                                 org.springframework.beans.factory.support.BeanDefinitionBuilder builder)

### doParse

    protected void doParse(Element element,
                           org.springframework.beans.factory.xml.ParserContext context,
                           org.springframework.beans.factory.support.BeanDefinitionBuilder builder)

### handleNestedDefinition

    protected void handleNestedDefinition(Element element,
                                          org.springframework.beans.factory.xml.ParserContext context,
                                          org.springframework.beans.factory.support.BeanDefinitionBuilder builder)

  If the reference is a nested bean, make it a top-level bean if it's a mandatory dependency. This is done so that the beans can be discovered at startup and the appCtx can start waiting.

  Parameters:
    `element` -
    `context` -
    `builder` -

### parseAttributes

    protected void parseAttributes(Element element,
                                   org.springframework.beans.factory.support.BeanDefinitionBuilder builder,
                                   AttributeCallback[] callbacks,
                                   OsgiDefaultsDefinition defaults)

  Allow subclasses to add their own callbacks.

  Parameters:
    `element` -
    `builder` -
    `callbacks` -

### getBeanClass

    protected abstract Class getBeanClass(Element element)

  Indicate the bean definition class for this element.

  Parameters:
    `element` -
  Returns:

### applyDefaultCardinality

    protected void applyDefaultCardinality(org.springframework.beans.factory.support.BeanDefinitionBuilder builder,
                                           OsgiDefaultsDefinition defaults)

  Apply default cardinality.

  Parameters:
    `builder` -
    `defaults` -

### parseNestedElements

    protected void parseNestedElements(Element element,
                                       org.springframework.beans.factory.xml.ParserContext context,
                                       org.springframework.beans.factory.support.BeanDefinitionBuilder builder)

  Parse nested elements. In case of a reference definition, this means using the listeners.

  Parameters:
    `element` -
    `context` -
    `builder` -

### getListenerElementName

    protected String getListenerElementName()

### parseInterfaces

    protected void parseInterfaces(Element parent,
                                   org.springframework.beans.factory.xml.ParserContext parserContext,
                                   org.springframework.beans.factory.support.BeanDefinitionBuilder builder)

  Parse interfaces.

  Parameters:
    `element` -
    `context` -
    `builder` -

### parseListeners

    protected void parseListeners(Element element,
                                  String subElementName,
                                  org.springframework.beans.factory.xml.ParserContext context,
                                  org.springframework.beans.factory.support.BeanDefinitionBuilder builder)

  Parse listeners.

  Parameters:
    `element` -
    `context` -
    `builder` -

### postProcessListenerDefinition

    protected void postProcessListenerDefinition(org.springframework.beans.factory.config.BeanDefinition wrapperDef)

### parsePropertySubElement

    protected Object parsePropertySubElement(org.springframework.beans.factory.xml.ParserContext context,
                                             Element beanDef,
                                             org.springframework.beans.factory.config.BeanDefinition beanDefinition)

### parsePropertySetElement

    protected Set parsePropertySetElement(org.springframework.beans.factory.xml.ParserContext context,
                                          Element beanDef,
                                          org.springframework.beans.factory.config.BeanDefinition beanDefinition)

### generateBeanName

    protected String generateBeanName(String prefix,
                                      org.springframework.beans.factory.config.BeanDefinition def,
                                      org.springframework.beans.factory.xml.ParserContext parserContext)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2013. All Rights Reserved.