1 package ch.qos.logback.core.model.processor; 2 3 import ch.qos.logback.core.model.Model; 4 import ch.qos.logback.core.spi.FilterReply; 5 6 public class AllowModelFilter implements ModelFilter { 7 8 final Class<? extends Model> allowedModelType; 9 10 AllowModelFilter(Class<? extends Model> allowedType) { 11 this.allowedModelType = allowedType; 12 } 13 14 @Override 15 public FilterReply decide(Model model) { 16 17 if (model.getClass() == allowedModelType) { 18 return FilterReply.ACCEPT; 19 } 20 21 return FilterReply.NEUTRAL; 22 } 23 24 }