Class BaseExtension

java.lang.Object
org.jibx.schema.codegen.custom.BaseExtension
Direct Known Subclasses:
ComponentExtension, SchemaExtension

public abstract class BaseExtension extends Object
Base extension information for any schema component. This is the basic extension structure that applies to each schema component.
Author:
Dennis M. Sosnoski
  • Field Details

    • s_logger

      private static final Logger s_logger
      Logger 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

      private final OpenAttrBase m_component
      Annotated schema definition component.
    • m_typeReplacer

      private TypeReplacer m_typeReplacer
      Type replacement implementation (null if no replacements at this level).
  • Constructor Details

    • BaseExtension

      public BaseExtension(OpenAttrBase comp)
      Constructor.
      Parameters:
      comp -
  • Method Details

    • getComponent

      public OpenAttrBase getComponent()
      Get schema component.
      Returns:
      component
    • setTypeReplacer

      public void setTypeReplacer(TypeReplacer replacer)
      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

      public QName getReplacementType(QName qname)
      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)