private static void checkConflict( String earlierRequirement, Set<Feature<?>> earlierFeatures, String newRequirement, Set<Feature<?>> newFeatures, Object source) throws ConflictingRequirementsException { if (!Collections.disjoint(newFeatures, earlierFeatures)) { throw new ConflictingRequirementsException( String.format( Locale.ROOT, "Annotation requires to be %s features that earlier " + "annotations required to be %s.", newRequirement, earlierRequirement), intersection(newFeatures, earlierFeatures), source); } }
addImpliedFeatures(Helpers.<Feature<?>>copyToSet(absentFeatures)); if (!Collections.disjoint(allPresentFeatures, allAbsentFeatures)) { throw new ConflictingRequirementsException( "Annotation explicitly or " + "implicitly requires one or more features to be both present "
private static void checkConflict( String earlierRequirement, Set<Feature<?>> earlierFeatures, String newRequirement, Set<Feature<?>> newFeatures, Object source) throws ConflictingRequirementsException { Set<Feature<?>> conflictingFeatures; conflictingFeatures = intersection(newFeatures, earlierFeatures); if (!conflictingFeatures.isEmpty()) { throw new ConflictingRequirementsException(String.format( "Annotation requires to be %s features that earlier " + "annotations required to be %s.", newRequirement, earlierRequirement), conflictingFeatures, source); } }
private static void checkConflict( String earlierRequirement, Set<Feature<?>> earlierFeatures, String newRequirement, Set<Feature<?>> newFeatures, Object source) throws ConflictingRequirementsException { if (!Collections.disjoint(newFeatures, earlierFeatures)) { throw new ConflictingRequirementsException( String.format( Locale.ROOT, "Annotation requires to be %s features that earlier " + "annotations required to be %s.", newRequirement, earlierRequirement), intersection(newFeatures, earlierFeatures), source); } }
addImpliedFeatures(Helpers.<Feature<?>>copyToSet(absentFeatures)); if (!Collections.disjoint(allPresentFeatures, allAbsentFeatures)) { throw new ConflictingRequirementsException( "Annotation explicitly or " + "implicitly requires one or more features to be both present "
intersection(allPresentFeatures, allAbsentFeatures); if (!conflictingFeatures.isEmpty()) { throw new ConflictingRequirementsException("Annotation explicitly or " + "implicitly requires one or more features to be both present " + "and absent.",