Package org.jibx.schema.codegen.custom
Class SchemaCustom.FacetRemoverVisitor
java.lang.Object
org.jibx.schema.SchemaVisitor
org.jibx.schema.codegen.custom.SchemaCustom.FacetRemoverVisitor
- Enclosing class:
SchemaCustom
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 Summary
FieldsModifier and TypeFieldDescriptionprivate NestingCustomBase
Currently active customization.private ObjectStack
Stack of active customizations. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
exit
(AnnotatedBase node) Exit the generic precursor class of all elements which can have customizations.boolean
visit
(AnnotatedBase node) Visit the generic precursor class of all elements which can have customizations.boolean
visit
(FacetElement node) Visit a facet element.Methods inherited from class org.jibx.schema.SchemaVisitor
exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
-
Field Details
-
m_customStack
Stack of active customizations. -
m_currentCustom
Currently active customization.
-
-
Constructor Details
-
FacetRemoverVisitor
Constructor.- Parameters:
root
- customization for root element being processed
-
-
Method Details
-
exit
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 classSchemaVisitor
- Parameters:
node
-
-
visit
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 classSchemaVisitor
- Parameters:
node
-- Returns:
true
if continuing expansion,false
if not
-
visit
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 classSchemaVisitor
- Parameters:
node
-- Returns:
true
if continuing expansion,false
if not
-