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
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 Summary
Fields Modifier and Type Field Description private NestingCustomBasem_currentCustomCurrently active customization.private ObjectStackm_customStackStack of active customizations.
-
Constructor Summary
Constructors Constructor Description FacetRemoverVisitor(SchemaCustom root)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexit(AnnotatedBase node)Exit the generic precursor class of all elements which can have customizations.booleanvisit(AnnotatedBase node)Visit the generic precursor class of all elements which can have customizations.booleanvisit(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 Detail
-
m_customStack
private ObjectStack m_customStack
Stack of active customizations.
-
m_currentCustom
private NestingCustomBase m_currentCustom
Currently active customization.
-
-
Constructor Detail
-
FacetRemoverVisitor
public FacetRemoverVisitor(SchemaCustom root)
Constructor.- Parameters:
root- customization for root element being processed
-
-
Method Detail
-
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:
exitin classSchemaVisitor- 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:
visitin classSchemaVisitor- Parameters:
node-- Returns:
trueif continuing expansion,falseif 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:
visitin classSchemaVisitor- Parameters:
node-- Returns:
trueif continuing expansion,falseif not
-
-