Set<String> allStyleClassSet = Sets.newHashSet(styleClassesMapping.keySet());
/** * Selects first only the classes that are assignable from the target, and * then returns the most specific matching classes. * * @param target the Class to match * @param availableClasses classes to search * @return Set of only the most specific classes that match the target. */ static Set<Class<?>> findBestMatches(Class<?> target, Set<Class<?>> availableClasses) { Set<Class<?>> matches = new HashSet<Class<?>>(); if (availableClasses.contains(target)) { return ImmutableSet.<Class<?>> of(target); } else { for (Class<?> clazz : availableClasses) { if (clazz.isAssignableFrom(target)) { matches.add(clazz); } } } Predicate<Class<?>> moreSpecificClassPredicate = createMostSpecificMatchPredicate( matches, Functions.<Class<?>> identity()); return Sets.filter(matches, moreSpecificClassPredicate); }
/** * Selects first only the classes that are assignable from the target, and * then returns the most specific matching classes. * * @param target the Class to match * @param availableClasses classes to search * @return Set of only the most specific classes that match the target. */ static Set<Class<?>> findBestMatches(Class<?> target, Set<Class<?>> availableClasses) { Set<Class<?>> matches = new HashSet<Class<?>>(); if (availableClasses.contains(target)) { return ImmutableSet.<Class<?>> of(target); } else { for (Class<?> clazz : availableClasses) { if (clazz.isAssignableFrom(target)) { matches.add(clazz); } } } Predicate<Class<?>> moreSpecificClassPredicate = createMostSpecificMatchPredicate( matches, Functions.<Class<?>> identity()); return Sets.filter(matches, moreSpecificClassPredicate); }
allowedAtRules = Sets.newHashSet(ExternalClassesCollector.EXTERNAL_AT_RULE);
/** * Selects first only the classes that are assignable from the target, and then returns the most * specific matching classes. * * @param target the Class to match * @param availableClasses classes to search * @return Set of only the most specific classes that match the target. */ static Set<Class<?>> findBestMatches(final Class<?> target, final Set<Class<?>> availableClasses) { final Set<Class<?>> matches = new HashSet<>(); if (availableClasses.contains(target)) { return ImmutableSet.<Class<?>>of(target); } else { for (final Class<?> clazz : availableClasses) { if (clazz.isAssignableFrom(target)) { matches.add(clazz); } } } final Predicate<Class<?>> moreSpecificClassPredicate = createMostSpecificMatchPredicate(matches, Functions.<Class<?>>identity()); return Sets.filter(matches, moreSpecificClassPredicate); }
public GwtSpecificValidatorCreator(JClassType validatorType, JClassType beanType, BeanHelper beanHelper, TreeLogger logger, GeneratorContext context, BeanHelperCache cache, Class<?>[] validGroupsFromAnnotation) { super(context, logger, validatorType, cache); this.beanType = beanType; this.beanHelper = beanHelper; Set<Class<?>> tempValidGroups = Sets.newHashSet(validGroupsFromAnnotation); tempValidGroups.add(Default.class); this.validGroups = Collections.unmodifiableSet(tempValidGroups); }
public GwtSpecificValidatorCreator(JClassType validatorType, JClassType beanType, BeanHelper beanHelper, TreeLogger logger, GeneratorContext context, BeanHelperCache cache, Class<?>[] validGroupsFromAnnotation) { super(context, logger, validatorType, cache); this.beanType = beanType; this.beanHelper = beanHelper; Set<Class<?>> tempValidGroups = Sets.newHashSet(validGroupsFromAnnotation); tempValidGroups.add(Default.class); this.validGroups = Collections.unmodifiableSet(tempValidGroups); }
/** * constructor. * * @param validatorType jclass type of the validator * @param beanType jclass type of the bean * @param beanHelper bean helper * @param logger tree logger * @param context generator context * @param cache bean helper cache * @param validGroupsFromAnnotation arrray of validation groups */ public GwtSpecificValidatorCreator(final JClassType validatorType, final JClassType beanType, final BeanHelper beanHelper, final TreeLogger logger, final GeneratorContext context, final BeanHelperCache cache, final Class<?>[] validGroupsFromAnnotation) { super(context, logger, validatorType, cache); this.beanType = beanType; this.beanHelper = beanHelper; final Set<Class<?>> tempValidGroups = Sets.newHashSet(validGroupsFromAnnotation); tempValidGroups.add(Default.class); validGroups = Collections.unmodifiableSet(tempValidGroups); }
Set<String> allStyleClassSet = Sets.newHashSet(styleClassesMapping.keySet());
Set<String> allStyleClassSet = Sets.newHashSet(styleClassesMapping.keySet());
Set<String> uniqueNames = Sets.newHashSet(); for (JMethod method : type.getMethods()) { if (method.getEnclosingType().getQualifiedSourceName().equals(typeName)) {
final Set<String> uniqueNames = Sets.newHashSet(); for (final JMethod method : type.getMethods()) { if (method.getEnclosingType().getQualifiedSourceName().equals(typeName)) {
allowedAtRules = Sets.newHashSet(ExternalClassesCollector.EXTERNAL_AT_RULE);
allowedAtRules = Sets.newHashSet(ExternalClassesCollector.EXTERNAL_AT_RULE);
final Set<Object> includedAnnotations = Sets.newHashSet(); int count = 0; for (final ConstraintDescriptor<?> constraint : ppropertyDescription
Set<Object> includedAnnotations = Sets.newHashSet(); int count = 0; for (ConstraintDescriptor<?> constraint : p.getConstraintDescriptors()) {
Set<Object> includedAnnotations = Sets.newHashSet(); int count = 0; for (ConstraintDescriptor<?> constraint : p.getConstraintDescriptors()) {