//# 0 errors, 178 messages
//#
/*
    //#ExportInfo.java:1:1: class: com.dmdirc.plugins.ExportInfo
    //#ExportInfo.java:1:1: method: com.dmdirc.plugins.ExportInfo.com.dmdirc.plugins.ExportInfo__static_init
 * Copyright (c) 2006-2009 Chris Smith, Shane Mc Cormack, Gregory Holmes
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */
package com.dmdirc.plugins;

public class ExportInfo {
	/** Name of class the export is in. */
	final String className;
	
	/** Name of method the export is in. */
	final String methodName;
	
	/** The PluginInfo that defined this export. */
	final PluginInfo pluginInfo;

	/**
	 * Create a new ExportInfo.
	 *
	 * @param methodName Name of method the export is in.
	 * @param className Name of class the export is in.
	 * @param pluginInfo The PluginInfo that defined this export.
	 */
	public ExportInfo(final String methodName, final String className, final PluginInfo pluginInfo) {
    //#ExportInfo.java:41: method: void com.dmdirc.plugins.ExportInfo.com.dmdirc.plugins.ExportInfo(String, String, PluginInfo)
    //#input(void com.dmdirc.plugins.ExportInfo(String, String, PluginInfo)): className
    //#input(void com.dmdirc.plugins.ExportInfo(String, String, PluginInfo)): methodName
    //#input(void com.dmdirc.plugins.ExportInfo(String, String, PluginInfo)): pluginInfo
    //#input(void com.dmdirc.plugins.ExportInfo(String, String, PluginInfo)): this
    //#output(void com.dmdirc.plugins.ExportInfo(String, String, PluginInfo)): this.className
    //#output(void com.dmdirc.plugins.ExportInfo(String, String, PluginInfo)): this.methodName
    //#output(void com.dmdirc.plugins.ExportInfo(String, String, PluginInfo)): this.pluginInfo
    //#post(void com.dmdirc.plugins.ExportInfo(String, String, PluginInfo)): this.className == className
    //#post(void com.dmdirc.plugins.ExportInfo(String, String, PluginInfo)): init'ed(this.className)
    //#post(void com.dmdirc.plugins.ExportInfo(String, String, PluginInfo)): this.methodName == methodName
    //#post(void com.dmdirc.plugins.ExportInfo(String, String, PluginInfo)): init'ed(this.methodName)
    //#post(void com.dmdirc.plugins.ExportInfo(String, String, PluginInfo)): this.pluginInfo == pluginInfo
    //#post(void com.dmdirc.plugins.ExportInfo(String, String, PluginInfo)): init'ed(this.pluginInfo)
		this.className = className;
		this.methodName = methodName;
		this.pluginInfo = pluginInfo;
	}
    //#ExportInfo.java:45: end of method: void com.dmdirc.plugins.ExportInfo.com.dmdirc.plugins.ExportInfo(String, String, PluginInfo)
	
	/**
	 * Get the ExportedService for this Export.
	 *
	 * @return ExportedService object for this export.
	 */
	public ExportedService getExportedService() {
		try {
			final Class<?> c = pluginInfo.getPluginClassLoader().loadClass(className, false);
    //#ExportInfo.java:54: method: ExportedService com.dmdirc.plugins.ExportInfo.getExportedService()
    //#input(ExportedService getExportedService()): ""._tainted
    //#input(ExportedService getExportedService()): "' (wanted by "._tainted
    //#input(ExportedService getExportedService()): ") -> "._tainted
    //#input(ExportedService getExportedService()): ") does not exist."._tainted
    //#input(ExportedService getExportedService()): "-resourcemanagerTimer"._tainted
    //#input(ExportedService getExportedService()): ".class"._tainted
    //#input(ExportedService getExportedService()): "Could not load "._tainted
    //#input(ExportedService getExportedService()): "Error loading '"._tainted
    //#input(ExportedService getExportedService()): "Resource '"._tainted
    //#input(ExportedService getExportedService()): "jar:.."._tainted
    //#input(ExportedService getExportedService()): com/dmdirc/plugins/GlobalClassLoader.__Class_Obj.__Lock
    //#input(ExportedService getExportedService()): com/dmdirc/plugins/GlobalClassLoader.me
    //#input(ExportedService getExportedService()): com/dmdirc/plugins/GlobalClassLoader.me.resourcesList
    //#input(ExportedService getExportedService()): com/dmdirc/plugins/PluginClassLoader.__Descendant_Table[com/dmdirc/plugins/PluginClassLoader]
    //#input(ExportedService getExportedService()): com/dmdirc/plugins/PluginClassLoader.__Descendant_Table[others]
    //#input(ExportedService getExportedService()): com/dmdirc/plugins/PluginClassLoader.__Dispatch_Table.isClassLoaded(Ljava/lang/String;Z)Z
    //#input(ExportedService getExportedService()): com/dmdirc/plugins/PluginClassLoader.__Dispatch_Table.loadClass(Ljava/lang/String;Z)Ljava/lang/Class;
    //#input(ExportedService getExportedService()): com/dmdirc/plugins/PluginInfo.__Descendant_Table[com/dmdirc/plugins/PluginInfo]
    //#input(ExportedService getExportedService()): com/dmdirc/plugins/PluginInfo.__Descendant_Table[others]
    //#input(ExportedService getExportedService()): com/dmdirc/plugins/PluginInfo.__Dispatch_Table.getClassList()Ljava/util/List;
    //#input(ExportedService getExportedService()): com/dmdirc/plugins/PluginInfo.__Dispatch_Table.getFullFilename()Ljava/lang/String;
    //#input(ExportedService getExportedService()): com/dmdirc/plugins/PluginInfo.__Dispatch_Table.getKeyValue(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    //#input(ExportedService getExportedService()): com/dmdirc/plugins/PluginInfo.__Dispatch_Table.getMainClass()Ljava/lang/String;
    //#input(ExportedService getExportedService()): com/dmdirc/plugins/PluginInfo.__Dispatch_Table.getName()Ljava/lang/String;
    //#input(ExportedService getExportedService()): com/dmdirc/plugins/PluginInfo.__Dispatch_Table.getPersistentClasses()Ljava/util/List;
    //#input(ExportedService getExportedService()): com/dmdirc/plugins/PluginInfo.__Dispatch_Table.getPluginClassLoader()Lcom/dmdirc/plugins/PluginClassLoader;
    //#input(ExportedService getExportedService()): com/dmdirc/plugins/PluginInfo.__Dispatch_Table.getPluginObject()Lcom/dmdirc/plugins/Plugin;
    //#input(ExportedService getExportedService()): com/dmdirc/plugins/PluginInfo.__Dispatch_Table.getResourceManager()Lcom/dmdirc/util/resourcemanager/ResourceManager;
    //#input(ExportedService getExportedService()): com/dmdirc/plugins/PluginInfo.__Dispatch_Table.getResourceManager(Z)Lcom/dmdirc/util/resourcemanager/ResourceManager;
    //#input(ExportedService getExportedService()): com/dmdirc/plugins/PluginInfo.__Dispatch_Table.isPersistent()Z
    //#input(ExportedService getExportedService()): com/dmdirc/plugins/PluginInfo.__Dispatch_Table.isPersistent(Ljava/lang/String;)Z
    //#input(ExportedService getExportedService()): com/dmdirc/plugins/PluginManager.__Descendant_Table[com/dmdirc/plugins/PluginManager]
    //#input(ExportedService getExportedService()): com/dmdirc/plugins/PluginManager.__Descendant_Table[others]
    //#input(ExportedService getExportedService()): com/dmdirc/plugins/PluginManager.__Dispatch_Table.getPluginInfos()Ljava/util/Collection;
    //#input(ExportedService getExportedService()): this
    //#input(ExportedService getExportedService()): this.className
    //#input(ExportedService getExportedService()): this.className._tainted
    //#input(ExportedService getExportedService()): this.methodName
    //#input(ExportedService getExportedService()): this.pluginInfo
    //#input(ExportedService getExportedService()): this.pluginInfo...__Tag
    //#input(ExportedService getExportedService()): this.pluginInfo...filename
    //#input(ExportedService getExportedService()): this.pluginInfo...filename._tainted
    //#input(ExportedService getExportedService()): this.pluginInfo...metaData
    //#input(ExportedService getExportedService()): this.pluginInfo...myResourceManager
    //#input(ExportedService getExportedService()): this.pluginInfo...url
    //#input(ExportedService getExportedService()): this.pluginInfo.__Tag
    //#input(ExportedService getExportedService()): this.pluginInfo.classloader
    //#input(ExportedService getExportedService()): this.pluginInfo.classloader.__Tag
    //#input(ExportedService getExportedService()): this.pluginInfo.classloader.pluginInfo
    //#input(ExportedService getExportedService()): this.pluginInfo.metaData
    //#input(ExportedService getExportedService()): this.pluginInfo.plugin
    //#output(ExportedService getExportedService()): com/dmdirc/plugins/GlobalClassLoader.me
    //#output(ExportedService getExportedService()): new ExportedService(getExportedService#1) num objects
    //#output(ExportedService getExportedService()): new ExportedService(getExportedService#1).__Tag
    //#output(ExportedService getExportedService()): new ExportedService(getExportedService#1).myMethod
    //#output(ExportedService getExportedService()): new ExportedService(getExportedService#1).myObject
    //#output(ExportedService getExportedService()): new ExportedService(getExportedService#2) num objects
    //#output(ExportedService getExportedService()): new ExportedService(getExportedService#2).__Tag
    //#output(ExportedService getExportedService()): new ExportedService(getExportedService#2).myMethod
    //#output(ExportedService getExportedService()): new ExportedService(getExportedService#2).myObject
    //#output(ExportedService getExportedService()): new GlobalClassLoader(getGlobalClassLoader#1) num objects
    //#output(ExportedService getExportedService()): new GlobalClassLoader(getGlobalClassLoader#1).__Tag
    //#output(ExportedService getExportedService()): new GlobalClassLoader(getGlobalClassLoader#1).resourcesList
    //#output(ExportedService getExportedService()): new HashMap(GlobalClassLoader#1) num objects
    //#output(ExportedService getExportedService()): return_value
    //#output(ExportedService getExportedService()): this.pluginInfo...myResourceManager
    //#new obj(ExportedService getExportedService()): new ExportedService(getExportedService#1)
    //#new obj(ExportedService getExportedService()): new ExportedService(getExportedService#2)
    //#new obj(ExportedService getExportedService()): new GlobalClassLoader(getGlobalClassLoader#1)
    //#new obj(ExportedService getExportedService()): new HashMap(GlobalClassLoader#1)
    //#pre[1] (ExportedService getExportedService()): (soft) com/dmdirc/plugins/GlobalClassLoader.me.resourcesList != null
    //#pre[2] (ExportedService getExportedService()): (soft) com/dmdirc/plugins/GlobalClassLoader.me != null
    //#pre[3] (ExportedService getExportedService()): (soft) init'ed(this.pluginInfo...myResourceManager)
    //#pre[5] (ExportedService getExportedService()): (soft) this.className != null
    //#pre[8] (ExportedService getExportedService()): (soft) this.pluginInfo != null
    //#pre[10] (ExportedService getExportedService()): (soft) this.pluginInfo...__Tag == com/dmdirc/plugins/PluginInfo
    //#pre[13] (ExportedService getExportedService()): (soft) init'ed(this.pluginInfo...metaData)
    //#pre[14] (ExportedService getExportedService()): (soft) this.pluginInfo...url != null
    //#pre[15] (ExportedService getExportedService()): (soft) this.pluginInfo.__Tag == com/dmdirc/plugins/PluginInfo
    //#pre[16] (ExportedService getExportedService()): (soft) this.pluginInfo.classloader != null
    //#pre[17] (ExportedService getExportedService()): (soft) this.pluginInfo.classloader.__Tag == com/dmdirc/plugins/PluginClassLoader
    //#pre[18] (ExportedService getExportedService()): (soft) this.pluginInfo.classloader.pluginInfo != null
    //#pre[19] (ExportedService getExportedService()): (soft) init'ed(this.pluginInfo.metaData)
    //#pre[20] (ExportedService getExportedService()): (soft) init'ed(this.pluginInfo.plugin)
    //#post(ExportedService getExportedService()): init'ed(com/dmdirc/plugins/GlobalClassLoader.me)
    //#post(ExportedService getExportedService()): return_value in Addr_Set{&new ExportedService(getExportedService#1),&new ExportedService(getExportedService#2)}
    //#post(ExportedService getExportedService()): init'ed(this.pluginInfo...myResourceManager)
    //#post(ExportedService getExportedService()): new ExportedService(getExportedService#1) num objects <= 1
    //#post(ExportedService getExportedService()): new ExportedService(getExportedService#1).__Tag == com/dmdirc/plugins/ExportedService
    //#post(ExportedService getExportedService()): init'ed(new ExportedService(getExportedService#1).myMethod)
    //#post(ExportedService getExportedService()): new ExportedService(getExportedService#1).myObject == One-of{this.pluginInfo.plugin, null}
    //#post(ExportedService getExportedService()): init'ed(new ExportedService(getExportedService#1).myObject)
    //#post(ExportedService getExportedService()): new ExportedService(getExportedService#2) num objects <= 1
    //#post(ExportedService getExportedService()): new ExportedService(getExportedService#2).__Tag == com/dmdirc/plugins/ExportedService
    //#post(ExportedService getExportedService()): init'ed(new ExportedService(getExportedService#2).myMethod)
    //#post(ExportedService getExportedService()): new ExportedService(getExportedService#2).myObject == null
    //#post(ExportedService getExportedService()): new GlobalClassLoader(getGlobalClassLoader#1) num objects == 0
    //#post(ExportedService getExportedService()): init'ed(new GlobalClassLoader(getGlobalClassLoader#1).__Tag)
    //#post(ExportedService getExportedService()): init'ed(new GlobalClassLoader(getGlobalClassLoader#1).resourcesList)
    //#post(ExportedService getExportedService()): new HashMap(GlobalClassLoader#1) num objects == 0
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:getPluginClassLoader
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:loadClass
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:java.lang.Class:getDeclaredMethods
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:java.lang.reflect.Method:getName
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:java.lang.String:equals
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:com.dmdirc.plugins.PluginClassLoader:findLoadedClass
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:java.lang.ClassLoader
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:java.util.HashMap
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:com.dmdirc.plugins.GlobalClassLoader:findLoadedClass
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:com.dmdirc.plugins.PluginClassLoader:getParent
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:getResourceManager
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:java.lang.String:replace
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:isPersistent
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:com.dmdirc.util.resourcemanager.ResourceManager:resourceExists
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:java.util.Map:get
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:com.dmdirc.util.resourcemanager.ResourceManager:getResourceManager
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:com.dmdirc.util.resourcemanager.ResourceManager:getResourceBytes
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:com.dmdirc.plugins.GlobalClassLoader:defineClass
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:java.lang.ClassLoader:loadClass
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:getPluginManager
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:getPluginInfos
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:java.util.Collection:iterator
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:java.util.Iterator:hasNext
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:java.util.Iterator:next
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:getClassList
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:java.util.List:contains
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:getPersistentClasses
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:java.util.List:iterator
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:java.util.Map:containsKey
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:getFullFilename
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:java.util.Map:put
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:getName
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:java.lang.NoClassDefFoundError:getMessage
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:java.lang.ClassNotFoundException
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:com.dmdirc.plugins.PluginClassLoader:defineClass
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:com.dmdirc.plugins.PluginClassLoader:resolveClass
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:com.dmdirc.util.ConfigFile:isKeyDomain
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:com.dmdirc.util.ConfigFile:getKeyDomain
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:java.net.URL:getPath
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:java.util.Timer
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:java.util.TimerTask
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:java.util.Timer:schedule
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:com.dmdirc.util.ConfigFile:isFlatDomain
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:com.dmdirc.util.ConfigFile:getFlatDomain
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:java.util.List:add
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:java.lang.String:matches
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:java.util.ArrayList
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:com.dmdirc.util.resourcemanager.ResourceManager:getResourcesStartingWith
    //#unanalyzed(ExportedService getExportedService()): Effects-of-calling:java.lang.String:replaceAll
			final Plugin p = className.equals(pluginInfo.getMainClass()) ? pluginInfo.getPluginObject() : null;
			return new ExportedService(c, methodName, p);
		} catch (ClassNotFoundException cnfe) {
			return new ExportedService(null, null);
    //#ExportInfo.java:58: end of method: ExportedService com.dmdirc.plugins.ExportInfo.getExportedService()
		}
	}
}    //#output(com.dmdirc.plugins.ExportInfo__static_init): __Descendant_Table[com/dmdirc/plugins/ExportInfo]
    //#output(com.dmdirc.plugins.ExportInfo__static_init): __Dispatch_Table.getExportedService()Lcom/dmdirc/plugins/ExportedService;
    //#post(com.dmdirc.plugins.ExportInfo__static_init): __Descendant_Table[com/dmdirc/plugins/ExportInfo] == &__Dispatch_Table
    //#post(com.dmdirc.plugins.ExportInfo__static_init): __Dispatch_Table.getExportedService()Lcom/dmdirc/plugins/ExportedService; == &getExportedService
    //#ExportInfo.java:: end of method: com.dmdirc.plugins.ExportInfo.com.dmdirc.plugins.ExportInfo__static_init
    //#ExportInfo.java:: end of class: com.dmdirc.plugins.ExportInfo
