final Class< ? > thisClass = ((ClassObjectType) pattern.getObjectType()).getClassType();
for ( final Iterator<Pattern> it = context.getObjectType().iterator(); it.hasNext(); ) {
final Pattern previousPattern = it.next();
final Class< ? > previousClass = ((ClassObjectType) previousPattern.getObjectType()).getClassType();
if ( thisClass.isAssignableFrom( previousClass ) ) {
betaConstraints.add( new InstanceNotEqualsConstraint( previousPattern ) );
}
}
// Must be added after the checking, otherwise it matches against itself
context.getObjectType().add( pattern );