com.sun.tools.xjc.reader.xmlschema
Class UnusedCustomizationChecker

java.lang.Object
  extended by com.sun.tools.xjc.reader.xmlschema.BindingComponent
      extended by com.sun.tools.xjc.reader.xmlschema.UnusedCustomizationChecker
All Implemented Interfaces:
XSContentTypeVisitor, XSSimpleTypeVisitor, XSTermVisitor, XSVisitor

 class UnusedCustomizationChecker
extends BindingComponent
implements XSVisitor, XSSimpleTypeVisitor

Reports all unacknowledged customizations as errors.

Since we scan the whole content tree, we use this to check for unused xmime:expectedContentTypes attributes. TODO: if we find this kind of error checks more common, use the visitors so that we don't have to mix everything in one class.


Constructor Summary
UnusedCustomizationChecker()
           
 
Method Summary
 void annotation(XSAnnotation ann)
           
 void attGroupDecl(XSAttGroupDecl decl)
           
 void attributeDecl(XSAttributeDecl decl)
           
 void attributeUse(XSAttributeUse use)
           
 void complexType(XSComplexType type)
           
 void elementDecl(XSElementDecl decl)
           
 void empty(XSContentType empty)
           
 void facet(XSFacet facet)
           
 void identityConstraint(XSIdentityConstraint id)
           
 void listSimpleType(XSListSimpleType type)
           
 void modelGroup(XSModelGroup group)
           
 void modelGroupDecl(XSModelGroupDecl decl)
           
 void notation(XSNotation notation)
           
 void particle(XSParticle particle)
           
 void restrictionSimpleType(XSRestrictionSimpleType type)
           
(package private)  void run()
          Runs the check.
 void schema(XSSchema schema)
           
 void simpleType(XSSimpleType simpleType)
           
 void unionSimpleType(XSUnionSimpleType type)
           
 void wildcard(XSWildcard wc)
           
 void xpath(XSXPath xp)
           
 
Methods inherited from class com.sun.tools.xjc.reader.xmlschema.BindingComponent
getClassSelector, getErrorReporter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnusedCustomizationChecker

UnusedCustomizationChecker()
Method Detail

run

void run()
Runs the check.


annotation

public void annotation(XSAnnotation ann)
Specified by:
annotation in interface XSVisitor

attGroupDecl

public void attGroupDecl(XSAttGroupDecl decl)
Specified by:
attGroupDecl in interface XSVisitor

attributeDecl

public void attributeDecl(XSAttributeDecl decl)
Specified by:
attributeDecl in interface XSVisitor

attributeUse

public void attributeUse(XSAttributeUse use)
Specified by:
attributeUse in interface XSVisitor

complexType

public void complexType(XSComplexType type)
Specified by:
complexType in interface XSVisitor

schema

public void schema(XSSchema schema)
Specified by:
schema in interface XSVisitor

facet

public void facet(XSFacet facet)
Specified by:
facet in interface XSVisitor

notation

public void notation(XSNotation notation)
Specified by:
notation in interface XSVisitor

wildcard

public void wildcard(XSWildcard wc)
Specified by:
wildcard in interface XSTermVisitor

modelGroupDecl

public void modelGroupDecl(XSModelGroupDecl decl)
Specified by:
modelGroupDecl in interface XSTermVisitor

modelGroup

public void modelGroup(XSModelGroup group)
Specified by:
modelGroup in interface XSTermVisitor

elementDecl

public void elementDecl(XSElementDecl decl)
Specified by:
elementDecl in interface XSTermVisitor

simpleType

public void simpleType(XSSimpleType simpleType)
Specified by:
simpleType in interface XSContentTypeVisitor

particle

public void particle(XSParticle particle)
Specified by:
particle in interface XSContentTypeVisitor

empty

public void empty(XSContentType empty)
Specified by:
empty in interface XSContentTypeVisitor

listSimpleType

public void listSimpleType(XSListSimpleType type)
Specified by:
listSimpleType in interface XSSimpleTypeVisitor

restrictionSimpleType

public void restrictionSimpleType(XSRestrictionSimpleType type)
Specified by:
restrictionSimpleType in interface XSSimpleTypeVisitor

unionSimpleType

public void unionSimpleType(XSUnionSimpleType type)
Specified by:
unionSimpleType in interface XSSimpleTypeVisitor

identityConstraint

public void identityConstraint(XSIdentityConstraint id)
Specified by:
identityConstraint in interface XSVisitor

xpath

public void xpath(XSXPath xp)
Specified by:
xpath in interface XSVisitor