Top Description Fields Constructors Methods
com.sun.msv.grammar.util

public abstract Class NameClassComparator

extends Object
implements NameClassVisitor
Class Inheritance
All Implemented Interfaces
com.sun.msv.grammar.NameClassVisitor
Known Direct Subclasses
com.sun.msv.grammar.util.NameClassCollisionChecker
Imports
com.sun.msv.grammar.AnyNameClass, .ChoiceNameClass, .DifferenceNameClass, .NameClass, .NameClassVisitor, .NamespaceNameClass, .NotNameClass, .SimpleNameClass

Abstract implementation of a function
  NameClass x NameClass ->  boolean
Override the probe method to define the actual function.

To compute, create an instance and call the check method. This class is not reentrant, so the caller is responsible not to reuse the same object by multiple threads.

Author
Kohsuke KAWAGUCHI

Field Summary

Modifier and TypeField and Description
protected final RuntimeException
eureka

This exception will be thrown when a collision is found.

private final String
protected NameClass
nc1

Two name classes to be tested.

protected NameClass
nc2

Two name classes to be tested.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
check(NameClass _new, NameClass _old)

Returns true if two name classes collide.

public Object
public Object
public Object
public Object
public Object
public Object
protected abstract void
probe(String uri, String local)

Throw eureka to return true from the probe method.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

eurekaback to summary
protected final RuntimeException eureka

This exception will be thrown when a collision is found.

MAGICback to summary
private final String MAGIC
nc1back to summary
protected NameClass nc1

Two name classes to be tested.

nc2back to summary
protected NameClass nc2

Two name classes to be tested.

Constructor Detail

NameClassComparatorback to summary
public NameClassComparator()

Method Detail

checkback to summary
public boolean check(NameClass _new, NameClass _old)

Returns true if two name classes collide.

onAnyNameback to summary
public Object onAnyName(AnyNameClass nc)

Implements com.sun.msv.grammar.NameClassVisitor.onAnyName.

onChoiceback to summary
public Object onChoice(ChoiceNameClass nc)

Implements com.sun.msv.grammar.NameClassVisitor.onChoice.

onDifferenceback to summary
public Object onDifference(DifferenceNameClass nc)

Implements com.sun.msv.grammar.NameClassVisitor.onDifference.

onNotback to summary
public Object onNot(NotNameClass nc)

Implements com.sun.msv.grammar.NameClassVisitor.onNot.

onNsNameback to summary
public Object onNsName(NamespaceNameClass nc)

Implements com.sun.msv.grammar.NameClassVisitor.onNsName.

onSimpleback to summary
public Object onSimple(SimpleNameClass nc)

Implements com.sun.msv.grammar.NameClassVisitor.onSimple.

probeback to summary
protected abstract void probe(String uri, String local)

Throw eureka to return true from the probe method.