001package ch.qos.logback.core.model.processor; 002 003import ch.qos.logback.core.model.Model; 004import ch.qos.logback.core.spi.FilterReply; 005 006public class AllowModelFilter implements ModelFilter { 007 008 final Class<? extends Model> allowedModelType; 009 010 AllowModelFilter(Class<? extends Model> allowedType) { 011 this.allowedModelType = allowedType; 012 } 013 014 @Override 015 public FilterReply decide(Model model) { 016 017 if (model.getClass() == allowedModelType) { 018 return FilterReply.ACCEPT; 019 } 020 021 return FilterReply.NEUTRAL; 022 } 023 024}