Package org.jibx.schema.codegen.custom
Class BaseExtension
java.lang.Object
org.jibx.schema.codegen.custom.BaseExtension
- Direct Known Subclasses:
ComponentExtension
,SchemaExtension
Base extension information for any schema component. This is the basic extension structure that applies to each
schema component.
- Author:
- Dennis M. Sosnoski
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
private final OpenAttrBase
Annotated schema definition component.private TypeReplacer
Type replacement implementation (null
if no replacements at this level).private static final Logger
Logger for class. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet schema component.getReplacementType
(QName qname) Get the replacement type to be substituted for a supplied type.void
setTypeReplacer
(TypeReplacer replacer) Set type replacer.
-
Field Details
-
s_logger
private static final Logger s_loggerLogger for class. -
ARITY_OPTIONAL_SINGLETON
public static final int ARITY_OPTIONAL_SINGLETON- See Also:
-
ARITY_REQUIRED_SINGLETON
public static final int ARITY_REQUIRED_SINGLETON- See Also:
-
ARITY_OPTIONAL_COLLECTION
public static final int ARITY_OPTIONAL_COLLECTION- See Also:
-
ARITY_REQUIRED_COLLECTION
public static final int ARITY_REQUIRED_COLLECTION- See Also:
-
m_component
Annotated schema definition component. -
m_typeReplacer
Type replacement implementation (null
if no replacements at this level).
-
-
Constructor Details
-
BaseExtension
Constructor.- Parameters:
comp
-
-
-
Method Details
-
getComponent
Get schema component.- Returns:
- component
-
setTypeReplacer
Set type replacer. This type replacer will apply to this extension and any child extensions which do not have their own type replacers.- Parameters:
replacer
-
-
getReplacementType
Get the replacement type to be substituted for a supplied type. This starts with this extension and then scans up the tree to find the first extension with a type replacer defined. If a type replacer is found at any level it is applied to the supplied type. If multiple extensions in the path up the tree have type replacers defined, only the first type replacer is used.- Parameters:
qname
- original type- Returns:
- substitute type (
null
if deletion; original type, if no substitution defined)
-