Class SchemaCustom.FacetRemoverVisitor

java.lang.Object
org.jibx.schema.SchemaVisitor
org.jibx.schema.codegen.custom.SchemaCustom.FacetRemoverVisitor
Enclosing class:
SchemaCustom

private static class SchemaCustom.FacetRemoverVisitor extends SchemaVisitor
Visitor to flag extensions to remove unused facets. This relies on each customization being set as the type substitution handler for the corresponding extension.
  • Field Details

    • m_customStack

      private ObjectStack m_customStack
      Stack of active customizations.
    • m_currentCustom

      private NestingCustomBase m_currentCustom
      Currently active customization.
  • Constructor Details

    • FacetRemoverVisitor

      public FacetRemoverVisitor(SchemaCustom root)
      Constructor.
      Parameters:
      root - customization for root element being processed
  • Method Details

    • exit

      public void exit(AnnotatedBase node)
      Exit the generic precursor class of all elements which can have customizations. This just pops the saved customization for the higher level off the stack.
      Overrides:
      exit in class SchemaVisitor
      Parameters:
      node -
    • visit

      public boolean visit(FacetElement node)
      Visit a facet element. This first calls the handling for the supertype, in order to activate a customization that applies to this particular element, then checks if the facet element subtype is to be included in the code generation.
      Overrides:
      visit in class SchemaVisitor
      Parameters:
      node -
      Returns:
      true if continuing expansion, false if not
    • visit

      public boolean visit(AnnotatedBase node)
      Visit the generic precursor class of all elements which can have customizations. This saves the current customization on the stack, then checks for one associated with the current element and makes that active if found.
      Overrides:
      visit in class SchemaVisitor
      Parameters:
      node -
      Returns:
      true if continuing expansion, false if not