code: private ConstraintChecker createChecker( ExecutionContext context,
                                               int type,
                                               String[] valueConstraints ) {
          switch (type) {
              case PropertyType.BINARY:
                  return new BinaryConstraintChecker(valueConstraints, context);
              case PropertyType.DATE:
                  return new DateTimeConstraintChecker(valueConstraints, context);
              case PropertyType.DOUBLE:
                  return new DoubleConstraintChecker(valueConstraints, context);
              case PropertyType.LONG:
                  return new LongConstraintChecker(valueConstraints, context);
              case PropertyType.NAME:
                  return new NameConstraintChecker(valueConstraints, context);
              case PropertyType.PATH:
                  return new PathConstraintChecker(valueConstraints, context);
              case PropertyType.REFERENCE:
              case PropertyType.WEAKREFERENCE:
                  return new ReferenceConstraintChecker(valueConstraints, context);
              case org.modeshape.jcr.api.PropertyType.SIMPLE_REFERENCE:
                  return new SimpleReferenceConstraintChecker(valueConstraints, context);
              case PropertyType.URI:
              case PropertyType.STRING:
                  return new StringConstraintChecker(valueConstraints, context);
              case PropertyType.DECIMAL:
                  return new DecimalConstraintChecker(valueConstraints, context);
              case PropertyType.BOOLEAN: {
                  return new BooleanConstraintChecker(context, valueConstraints);
              }
              default:
                  throw new IllegalStateException("Invalid property type: " + type);
          }
      }
docs: Returns a {@link ConstraintChecker} that will interpret the constraints described by <code>valueConstraints</code> using
  the semantics defined in section 3.6.4 of the JCR 2.0 specification for the type indicated by <code>type</code> (where
  <code>type</code> is a value from {@link PropertyType}) for the given <code>context</code>. The {@link ExecutionContext} is
  used to provide namespace mappings and value factories for the other constraint checkers.
  
  @param context the execution context
  @param type the type of constraint checker that should be created (based on values from {@link PropertyType}).
  Type-specific semantics are defined in section 3.7.3.6 of the JCR 2.0 specification.
  @param valueConstraints the constraints for the node as provided by {@link PropertyDefinition#getValueConstraints()}.
  @return a constraint checker that matches the given parameters