com.iwillfailyou.inspections.allfinal.nonfinals.ExcludeCatchParams Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-inspections Show documentation
Show all versions of java-inspections Show documentation
Java inspections library for iwillfailyou
package com.iwillfailyou.inspections.allfinal.nonfinals;
import com.iwillfailyou.inspection.InspectionException;
import com.iwillfailyou.inspection.Violations;
import org.cactoos.collection.Filtered;
import org.cactoos.list.ListOf;
import java.util.List;
public final class ExcludeCatchParams implements Violations {
private final Violations origin;
public ExcludeCatchParams(final Violations origin) {
this.origin = origin;
}
@Override
public List asList() throws InspectionException {
return new ListOf<>(
new Filtered<>(
(final Nonfinal valuation) -> !valuation.isCatchParam(),
origin.asList()
)
);
}
}