1 /*
2 * $Id: InheritDefinitionParser.java 19191 2010-08-25 21:05:23Z tcarlson $
3 * --------------------------------------------------------------------------------------
4 * Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com
5 *
6 * The software in this package is published under the terms of the CPAL v1.0
7 * license, a copy of which has been included with this distribution in the
8 * LICENSE.txt file.
9 */
10
11 package org.mule.config.spring.parsers.delegate;
12
13 import org.mule.config.spring.parsers.generic.NamedDefinitionParser;
14 import org.mule.config.spring.parsers.generic.OrphanDefinitionParser;
15
16 /**
17 * This encapsulates two definition parsers - orphan and named - and returns the
18 * named definition parser if the "inherit" attribute is set. This allows a named
19 * orphan to be defined (inherit="false") and then extended (inherit="true").
20 * The two sub-parsers must be consistent, as described in
21 * {@link org.mule.config.spring.parsers.delegate.AbstractParallelDelegatingDefinitionParser}
22 */
23 public class InheritDefinitionParser extends BooleanAttributeSelectionDefinitionParser
24 {
25
26 public static final String INHERIT = "inherit";
27
28 public InheritDefinitionParser(OrphanDefinitionParser orphan, NamedDefinitionParser named)
29 {
30 this(false, orphan, named);
31 }
32
33 public InheritDefinitionParser(boolean deflt, OrphanDefinitionParser orphan, NamedDefinitionParser named)
34 {
35 super(INHERIT, deflt, named, orphan);
36 }
37
38 }