public static WellKnownMutability fromFlags(ErrorProneFlags flags) { List<String> immutable = flags.getList("Immutable:KnownImmutable").orElse(ImmutableList.of()); List<String> unsafe = flags.getList("Immutable:KnownUnsafe").orElse(ImmutableList.of()); return new WellKnownMutability(immutable, unsafe); }
public Unused(ErrorProneFlags flags) { ImmutableSet.Builder<String> methodAnnotationsExemptingParameters = ImmutableSet.<String>builder() .add("org.robolectric.annotation.Implementation"); flags .getList("Unused:methodAnnotationsExemptingParameters") .ifPresent(methodAnnotationsExemptingParameters::addAll); this.methodAnnotationsExemptingParameters = methodAnnotationsExemptingParameters.build(); this.reportInjectedFields = flags.getBoolean("Unused:ReportInjectedFields").orElse(false); }
@SuppressWarnings("WeakerAccess") // Public for ErrorProne public UseAutoDispose(ErrorProneFlags flags) { Optional<ImmutableSet<String>> inputClasses = flags.getList("TypesWithScope").map(ImmutableSet::copyOf); Optional<Boolean> overrideScopes = flags.getBoolean("OverrideScopes"); ImmutableSet<String> classesWithScope = getClassesWithScope(inputClasses, overrideScopes); matcher = allOf(SUBSCRIBE_METHOD, matcher(classesWithScope)); lenient = flags.getBoolean("Lenient").orElse(false); }
public static WellKnownMutability fromFlags(ErrorProneFlags flags) { ImmutableList<String> immutable = flags.getList("Immutable:KnownImmutable").orElse(ImmutableList.of()); ImmutableList<String> unsafe = flags.getList("Immutable:KnownUnsafe").orElse(ImmutableList.of()); return new WellKnownMutability(immutable, unsafe); }
public Unused(ErrorProneFlags flags) { ImmutableSet.Builder<String> methodAnnotationsExemptingParameters = ImmutableSet.<String>builder() .add("org.robolectric.annotation.Implementation"); flags .getList("Unused:methodAnnotationsExemptingParameters") .ifPresent(methodAnnotationsExemptingParameters::addAll); this.methodAnnotationsExemptingParameters = methodAnnotationsExemptingParameters.build(); this.reportInjectedFields = flags.getBoolean("Unused:ReportInjectedFields").orElse(false); }