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

📄 portletapplicationmap.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:   PortletApplicationMap.java

package org.apache.struts2.portlet;

import java.io.Serializable;
import java.util.*;
import javax.portlet.PortletContext;

public class PortletApplicationMap extends AbstractMap
	implements Serializable
{

	private static final long serialVersionUID = 0x1fdd699db30be61eL;
	private PortletContext context;
	private Set entries;

	public PortletApplicationMap(PortletContext ctx)
	{
		context = ctx;
	}

	public void clear()
	{
		entries = null;
		for (Enumeration e = context.getAttributeNames(); e.hasMoreElements(); context.removeAttribute(e.nextElement().toString()));
	}

	public Set entrySet()
	{
		if (entries == null)
		{
			entries = new HashSet();
			final String key;
			final Object value;
			for (Enumeration enumeration = context.getAttributeNames(); enumeration.hasMoreElements(); entries.add(new java.util.Map.Entry() {

		final String val$key;
		final Object val$value;
		final PortletApplicationMap this$0;

		public boolean equals(Object obj)
		{
			java.util.Map.Entry entry = (java.util.Map.Entry)obj;
			return (key != null ? key.equals(entry.getKey()) : entry.getKey() == null) && (value != null ? value.equals(entry.getValue()) : entry.getValue() == null);
		}

		public int hashCode()
		{
			return (key != null ? key.hashCode() : 0) ^ (value != null ? value.hashCode() : 0);
		}

		public Object getKey()
		{
			return key;
		}

		public Object getValue()
		{
			return value;
		}

		public Object setValue(Object obj)
		{
			context.setAttribute(key.toString(), obj);
			return value;
		}

			
			{
				this$0 = PortletApplicationMap.this;
				key = s;
				value = obj;
				super();
			}
	}))
			{
				key = enumeration.nextElement().toString();
				value = context.getAttribute(key);
			}

			final String key;
			final Object value;
			for (Enumeration enumeration = context.getInitParameterNames(); enumeration.hasMoreElements(); entries.add(new java.util.Map.Entry() {

		final String val$key;
		final Object val$value;
		final PortletApplicationMap this$0;

		public boolean equals(Object obj)
		{
			java.util.Map.Entry entry = (java.util.Map.Entry)obj;
			return (key != null ? key.equals(entry.getKey()) : entry.getKey() == null) && (value != null ? value.equals(entry.getValue()) : entry.getValue() == null);
		}

		public int hashCode()
		{
			return (key != null ? key.hashCode() : 0) ^ (value != null ? value.hashCode() : 0);
		}

		public Object getKey()
		{
			return key;
		}

		public Object getValue()
		{
			return value;
		}

		public Object setValue(Object obj)
		{
			context.setAttribute(key.toString(), obj);
			return value;
		}

			
			{
				this$0 = PortletApplicationMap.this;
				key = s;
				value = obj;
				super();
			}
	}))
			{
				key = enumeration.nextElement().toString();
				value = context.getInitParameter(key);
			}

		}
		return entries;
	}

	public Object get(Object key)
	{
		String keyString = key.toString();
		Object value = context.getAttribute(keyString);
		return value != null ? value : context.getInitParameter(keyString);
	}

	public Object put(Object key, Object value)
	{
		entries = null;
		context.setAttribute(key.toString(), value);
		return get(key);
	}

	public Object remove(Object key)
	{
		entries = null;
		Object value = get(key);
		context.removeAttribute(key.toString());
		return value;
	}

}

⌨️ 快捷键说明

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