⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 defaultsettings.java

📁 struts 2 核心包 的源码 有错误是难免的
💻 JAVA
字号:
// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space 
// Source File Name:   DefaultSettings.java

package org.apache.struts2.config;

import java.util.*;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

// Referenced classes of package org.apache.struts2.config:
//			Settings, PropertiesSettings, DelegatingSettings

public class DefaultSettings extends Settings
{

	protected Log log;
	Settings delegate;

	public DefaultSettings()
	{
		log = LogFactory.getLog(getClass());
		ArrayList list = new ArrayList();
		try
		{
			list.add(new PropertiesSettings("struts"));
		}
		catch (Exception e)
		{
			log.warn("DefaultSettings: Could not find or error in struts.properties", e);
		}
		Settings settings[] = new Settings[list.size()];
		delegate = new DelegatingSettings((Settings[])list.toArray(settings));
		try
		{
			for (StringTokenizer customProperties = new StringTokenizer(delegate.getImpl("struts.custom.properties"), ","); customProperties.hasMoreTokens();)
			{
				String name = customProperties.nextToken();
				try
				{
					list.add(new PropertiesSettings(name));
				}
				catch (Exception e)
				{
					log.error((new StringBuilder()).append("DefaultSettings: Could not find ").append(name).append(".properties. Skipping.").toString());
				}
			}

			settings = new Settings[list.size()];
			delegate = new DelegatingSettings((Settings[])list.toArray(settings));
		}
		catch (IllegalArgumentException e) { }
	}

	public void setImpl(String name, String value)
		throws IllegalArgumentException, UnsupportedOperationException
	{
		delegate.setImpl(name, value);
	}

	public String getImpl(String aName)
		throws IllegalArgumentException
	{
		return delegate.getImpl(aName);
	}

	public boolean isSetImpl(String aName)
	{
		return delegate.isSetImpl(aName);
	}

	public Iterator listImpl()
	{
		return delegate.listImpl();
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -