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