com.ibm.wala.util.scope
Class EclipseAnalysisScope

java.lang.Object
  extended by com.ibm.wala.ipa.callgraph.AnalysisScope
      extended by com.ibm.wala.util.scope.EclipseAnalysisScope

Deprecated.

@Deprecated
public class EclipseAnalysisScope
extends AnalysisScope

This class is used to build the complete analysis scope for analyzing an Eclipse plugin.

Given an Eclipse plugin, this class detects all the other plugins that should be part of the analysis scope when analyzing the given plugin. This is buggy in that it ignores the Import-Package declarations in the manifest. This is a problem. Probably the way to go is to recode this whole thing using a headless Eclipse instance, and rely on Eclipse APIs to resolve dependencies the right way.


Field Summary
static boolean DEBUG
          Deprecated.  
 
Fields inherited from class com.ibm.wala.ipa.callgraph.AnalysisScope
APPLICATION, EXTENSION, loadersByName, PRIMORDIAL, SYNTHETIC
 
Constructor Summary
EclipseAnalysisScope(java.lang.String pluginName)
          Deprecated.  
 
Method Summary
 void addClassFileToScope(ClassLoaderReference loader, java.io.File file)
          Deprecated. Add a class file to the scope for a loader
 void addSourceFileToScope(ClassLoaderReference loader, java.io.File file, java.lang.String fileName)
          Deprecated. Add a class file to the scope for a loader
 void addToScope(ClassLoaderReference loader, java.util.jar.JarFile file)
          Deprecated. Add a jar file to the scope for a loader
 void addToScope(ClassLoaderReference loader, Module m)
          Deprecated. Add a module to the scope for a loader
 EMFScopeWrapper buildDelegate(java.io.File pluginDirectory)
          Deprecated.  
 boolean equals(java.lang.Object obj)
          Deprecated.  
static java.util.Set<java.util.jar.JarFile> findJars(java.io.File baseDir)
          Deprecated. Finds all the JAR files in a given directory and all its subdirectories recursively.
 MethodReference findMethod(Atom loader, java.lang.String klass, Atom name, ImmutableByteArray desc)
          Deprecated. Utility function.
static java.io.File findPluginDirOrJAR(java.lang.String libName, java.lang.String pluginsDirName, java.io.File pluginDirectory)
          Deprecated. Converts a plugin name into an actual name in the file system.
 ClassLoaderReference getApplicationLoader()
          Deprecated. Return the information regarding the application loader.
 ArrayClassLoader getArrayClassLoader()
          Deprecated.  
 SetOfClasses getExclusions()
          Deprecated.  
 ClassLoaderReference getExtensionLoader()
          Deprecated. Return the information regarding the extension loader.
static java.io.InputStream getInputStream(java.lang.String xmlFileName)
          Deprecated. Return an InputStream to the plugin.xml file describing the plugin configuration.
 java.lang.String getJavaLibraryVersion()
          Deprecated.  
 ClassLoaderReference getLoader(Atom name)
          Deprecated.  
 java.lang.String getLoaderImpl(ClassLoaderReference ref)
          Deprecated.  
 java.util.Collection<ClassLoaderReference> getLoaders()
          Deprecated.  
 java.util.Set<Module> getModules(ClassLoaderReference loader)
          Deprecated.  
 int getNumberOfLoaders()
          Deprecated.  
 java.lang.String getPluginName()
          Deprecated.  
 java.lang.String getPluginsDirName()
          Deprecated.  
 ClassLoaderReference getPrimordialLoader()
          Deprecated. Return the information regarding the primordial loader.
 ClassLoaderReference getSyntheticLoader()
          Deprecated. Return the information regarding the application loader.
 int hashCode()
          Deprecated.  
 boolean isJava14Libraries()
          Deprecated.  
 boolean isJava15Libraries()
          Deprecated.  
 void setExclusions(SetOfClasses classes)
          Deprecated.  
 java.lang.String toString()
          Deprecated.  
 
Methods inherited from class com.ibm.wala.ipa.callgraph.AnalysisScope
classLoaderName2Ref, getExclusionString, setLoaderImpl
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DEBUG

public static final boolean DEBUG
Deprecated. 
See Also:
Constant Field Values
Constructor Detail

EclipseAnalysisScope

public EclipseAnalysisScope(java.lang.String pluginName)
                     throws WalaException
Deprecated. 
Parameters:
pluginName - name of the plugin to be analyzed
Throws:
WalaException
Method Detail

buildDelegate

public EMFScopeWrapper buildDelegate(java.io.File pluginDirectory)
                              throws WalaException
Deprecated. 
Throws:
WalaException

findPluginDirOrJAR

public static java.io.File findPluginDirOrJAR(java.lang.String libName,
                                              java.lang.String pluginsDirName,
                                              java.io.File pluginDirectory)
                                       throws java.lang.IllegalArgumentException
Deprecated. 
Converts a plugin name into an actual name in the file system. For example, "org.eclipse.help.appserver" would be converted to something like "E:\eclipse3.0M7\eclipse\plugins\org.eclipse.help.appserver_3.0.0" if the plugin is available in a directory or "E:\eclipse3.0M7\eclipse\plugins\org.eclipse.help.appserver_3.0.0.jar" if the plugin is available as a JAR file.

Parameters:
libName - a String representing the name of a plugin
Returns:
a File representing the directory or JAR file containing the plugin. This method returns null if no directory or JAR file was found for this plugin.
Throws:
java.lang.IllegalArgumentException - if pluginDirectory is null

findJars

public static java.util.Set<java.util.jar.JarFile> findJars(java.io.File baseDir)
                                                     throws java.lang.IllegalArgumentException
Deprecated. 
Finds all the JAR files in a given directory and all its subdirectories recursively.

Parameters:
baseDir - a File representing the base directory of the plugin.
Returns:
a Set of Strings, each of which represents the name of a JAR file in the given directory.
Throws:
java.lang.IllegalArgumentException

getInputStream

public static java.io.InputStream getInputStream(java.lang.String xmlFileName)
Deprecated. 
Return an InputStream to the plugin.xml file describing the plugin configuration. The InputStream returned is null if the XML file does not exist or cannot be opened.

Parameters:
xmlFileName - a String representing the name of the plugin.xml file describing the plugin configuration.
Returns:
an InputStream to the plugin.xml file.

addClassFileToScope

public void addClassFileToScope(ClassLoaderReference loader,
                                java.io.File file)
Deprecated. 
Description copied from class: AnalysisScope
Add a class file to the scope for a loader

Overrides:
addClassFileToScope in class AnalysisScope

addSourceFileToScope

public void addSourceFileToScope(ClassLoaderReference loader,
                                 java.io.File file,
                                 java.lang.String fileName)
Deprecated. 
Description copied from class: AnalysisScope
Add a class file to the scope for a loader

Overrides:
addSourceFileToScope in class AnalysisScope

addToScope

public void addToScope(ClassLoaderReference loader,
                       java.util.jar.JarFile file)
Deprecated. 
Description copied from class: AnalysisScope
Add a jar file to the scope for a loader

Overrides:
addToScope in class AnalysisScope

addToScope

public void addToScope(ClassLoaderReference loader,
                       Module m)
Deprecated. 
Description copied from class: AnalysisScope
Add a module to the scope for a loader

Overrides:
addToScope in class AnalysisScope

equals

public boolean equals(java.lang.Object obj)
Deprecated. 
Overrides:
equals in class java.lang.Object

findMethod

public MethodReference findMethod(Atom loader,
                                  java.lang.String klass,
                                  Atom name,
                                  ImmutableByteArray desc)
Deprecated. 
Description copied from class: AnalysisScope
Utility function. Useful when parsing input.

Overrides:
findMethod in class AnalysisScope

getApplicationLoader

public ClassLoaderReference getApplicationLoader()
Deprecated. 
Description copied from class: AnalysisScope
Return the information regarding the application loader.

Overrides:
getApplicationLoader in class AnalysisScope
Returns:
ClassLoaderReference

getArrayClassLoader

public ArrayClassLoader getArrayClassLoader()
Deprecated. 
Overrides:
getArrayClassLoader in class AnalysisScope
Returns:
Returns the arrayClassLoader.

getExclusions

public SetOfClasses getExclusions()
Deprecated. 
Overrides:
getExclusions in class AnalysisScope

getExtensionLoader

public ClassLoaderReference getExtensionLoader()
Deprecated. 
Description copied from class: AnalysisScope
Return the information regarding the extension loader.

Overrides:
getExtensionLoader in class AnalysisScope
Returns:
ClassLoaderReference

getJavaLibraryVersion

public java.lang.String getJavaLibraryVersion()
Deprecated. 
Overrides:
getJavaLibraryVersion in class AnalysisScope

getLoader

public ClassLoaderReference getLoader(Atom name)
Deprecated. 
Overrides:
getLoader in class AnalysisScope
Returns:
the ClassLoaderReference specified by name.

getLoaderImpl

public java.lang.String getLoaderImpl(ClassLoaderReference ref)
Deprecated. 
Overrides:
getLoaderImpl in class AnalysisScope

getLoaders

public java.util.Collection<ClassLoaderReference> getLoaders()
Deprecated. 
Overrides:
getLoaders in class AnalysisScope
Returns:
an Iterator over the loaders.

getModules

public java.util.Set<Module> getModules(ClassLoaderReference loader)
Deprecated. 
Overrides:
getModules in class AnalysisScope

getNumberOfLoaders

public int getNumberOfLoaders()
Deprecated. 
Overrides:
getNumberOfLoaders in class AnalysisScope
Returns:
the number of loaders.

getPrimordialLoader

public ClassLoaderReference getPrimordialLoader()
Deprecated. 
Description copied from class: AnalysisScope
Return the information regarding the primordial loader.

Overrides:
getPrimordialLoader in class AnalysisScope
Returns:
ClassLoaderReference

getSyntheticLoader

public ClassLoaderReference getSyntheticLoader()
Deprecated. 
Description copied from class: AnalysisScope
Return the information regarding the application loader.

Overrides:
getSyntheticLoader in class AnalysisScope
Returns:
ClassLoaderReference

hashCode

public int hashCode()
Deprecated. 
Overrides:
hashCode in class java.lang.Object

isJava14Libraries

public boolean isJava14Libraries()
Deprecated. 
Overrides:
isJava14Libraries in class AnalysisScope

isJava15Libraries

public boolean isJava15Libraries()
Deprecated. 
Overrides:
isJava15Libraries in class AnalysisScope

setExclusions

public void setExclusions(SetOfClasses classes)
Deprecated. 
Overrides:
setExclusions in class AnalysisScope

toString

public java.lang.String toString()
Deprecated. 
Overrides:
toString in class AnalysisScope

getPluginName

public java.lang.String getPluginName()
Deprecated. 

getPluginsDirName

public java.lang.String getPluginsDirName()
Deprecated.