001/* 002 * Logback: the reliable, generic, fast and flexible logging framework. 003 * Copyright (C) 1999-2026, QOS.ch. All rights reserved. 004 * 005 * This program and the accompanying materials are dual-licensed under 006 * either the terms of the Eclipse Public License v2.0 as published by 007 * the Eclipse Foundation 008 * 009 * or (per the licensee's choosing) 010 * 011 * under the terms of the GNU Lesser General Public License version 2.1 012 * as published by the Free Software Foundation. 013 */ 014 015package ch.qos.logback.core.model.processor; 016 017import java.io.FileInputStream; 018import java.io.FileNotFoundException; 019import java.io.IOException; 020import java.io.InputStream; 021import java.net.URL; 022 023import ch.qos.logback.core.Context; 024import ch.qos.logback.core.joran.action.ActionUtil; 025import ch.qos.logback.core.joran.action.ActionUtil.Scope; 026import ch.qos.logback.core.model.Model; 027import ch.qos.logback.core.model.ModelConstants; 028import ch.qos.logback.core.model.PropertyModel; 029import ch.qos.logback.core.model.util.PropertyModelHandlerHelper; 030import ch.qos.logback.core.util.Loader; 031 032public class PropertyModelHandler extends ModelHandlerBase { 033 034 public PropertyModelHandler(Context context) { 035 super(context); 036 } 037 038 static public ModelHandlerBase makeInstance(Context context, ModelInterpretationContext ic) { 039 return new PropertyModelHandler(context); 040 } 041 042 @Override 043 protected Class<PropertyModel> getSupportedModelClass() { 044 return PropertyModel.class; 045 } 046 047 @Override 048 public void handle(ModelInterpretationContext mic, Model model) { 049 050 PropertyModel propertyModel = (PropertyModel) model; 051 PropertyModelHandlerHelper propertyModelHandlerHelper = new PropertyModelHandlerHelper(this); 052 propertyModelHandlerHelper.setContext(context); 053 propertyModelHandlerHelper.handlePropertyModel(mic, propertyModel); 054 } 055 056}