org.jibx.schema.codegen.custom
Class SchemaCustom.FacetRemoverVisitor

java.lang.Object
  extended by org.jibx.schema.SchemaVisitor
      extended by 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
private  NestingCustomBase m_currentCustom
          Currently active customization.
private  ObjectStack m_customStack
          Stack of active customizations.
 
Constructor Summary
SchemaCustom.FacetRemoverVisitor(SchemaCustom root)
          Constructor.
 
Method Summary
 void 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, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_customStack

private ObjectStack m_customStack
Stack of active customizations.


m_currentCustom

private NestingCustomBase m_currentCustom
Currently active customization.

Constructor Detail

SchemaCustom.FacetRemoverVisitor

public SchemaCustom.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:
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


Project Web Site