org-openide-execution

16:40:29.682 INFO  jd.cli.Main - Decompiling org-openide-execution.jar
package org.openide.execution;

import org.openide.util.RequestProcessor;
import org.openide.util.RequestProcessor.Task;
import org.openide.windows.InputOutput;

final class ExecutionEngine$Trivial$ET
  extends ExecutorTask
{
  private RequestProcessor.Task task;
  private int resultValue;
  private final String name;
  private InputOutput io;
  
  public ExecutionEngine$Trivial$ET(Runnable paramRunnable, String paramString, InputOutput paramInputOutput)
  {
    super(paramRunnable);
    resultValue = resultValue;
    name = paramString;
    task = RequestProcessor.getDefault().post(this);
  }
  
  public void stop()
  {
    task.cancel();
  }
  
  public int result()
  {
    waitFinished();
    return resultValue;
  }
  
  public InputOutput getInputOutput()
  {
    return io;
  }
  
  public void run()
  {
    try
    {
      super.run();
    }
    catch (RuntimeException localRuntimeException)
    {
      localRuntimeException.printStackTrace();
      resultValue = 1;
    }
  }
}

/* Location:
 * Qualified Name:     org.openide.execution.ExecutionEngine.Trivial.ET
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.openide.execution;

import java.security.AllPermission;
import java.security.CodeSource;
import java.security.PermissionCollection;
import java.security.Permissions;
import org.openide.util.RequestProcessor;
import org.openide.util.RequestProcessor.Task;
import org.openide.windows.InputOutput;

final class ExecutionEngine$Trivial
  extends ExecutionEngine
{
  protected NbClassPath createLibraryPath()
  {
    return new NbClassPath(new String[0]);
  }
  
  protected PermissionCollection createPermissions(CodeSource paramCodeSource, InputOutput paramInputOutput)
  {
    Permissions localPermissions = new Permissions();
    localPermissions.add(new AllPermission());
    localPermissions.setReadOnly();
    return localPermissions;
  }
  
  public ExecutorTask execute(String paramString, Runnable paramRunnable, InputOutput paramInputOutput)
  {
    return new ET(paramRunnable, paramString, paramInputOutput);
  }
  
  private static final class ET
    extends ExecutorTask
  {
    private RequestProcessor.Task task;
    private int resultValue;
    private final String name;
    private InputOutput io;
    
    public ET(Runnable paramRunnable, String paramString, InputOutput paramInputOutput)
    {
      super();
      resultValue = resultValue;
      name = paramString;
      task = RequestProcessor.getDefault().post(this);
    }
    
    public void stop()
    {
      task.cancel();
    }
    
    public int result()
    {
      waitFinished();
      return resultValue;
    }
    
    public InputOutput getInputOutput()
    {
      return io;
    }
    
    public void run()
    {
      try
      {
        super.run();
      }
      catch (RuntimeException localRuntimeException)
      {
        localRuntimeException.printStackTrace();
        resultValue = 1;
      }
    }
  }
}

/* Location:
 * Qualified Name:     org.openide.execution.ExecutionEngine.Trivial
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.openide.execution;

import java.security.AllPermission;
import java.security.CodeSource;
import java.security.PermissionCollection;
import java.security.Permissions;
import org.openide.util.Lookup;
import org.openide.util.RequestProcessor;
import org.openide.util.RequestProcessor.Task;
import org.openide.windows.InputOutput;

public abstract class ExecutionEngine
{
  public abstract ExecutorTask execute(String paramString, Runnable paramRunnable, InputOutput paramInputOutput);
  
  protected abstract PermissionCollection createPermissions(CodeSource paramCodeSource, InputOutput paramInputOutput);
  
  /**
   * @deprecated
   */
  protected abstract NbClassPath createLibraryPath();
  
  public static ExecutionEngine getDefault()
  {
    Object localObject = (ExecutionEngine)Lookup.getDefault().lookup(ExecutionEngine.class);
    if (localObject == null) {
      localObject = new Trivial();
    }
    return (ExecutionEngine)localObject;
  }
  
  static final class Trivial
    extends ExecutionEngine
  {
    protected NbClassPath createLibraryPath()
    {
      return new NbClassPath(new String[0]);
    }
    
    protected PermissionCollection createPermissions(CodeSource paramCodeSource, InputOutput paramInputOutput)
    {
      Permissions localPermissions = new Permissions();
      localPermissions.add(new AllPermission());
      localPermissions.setReadOnly();
      return localPermissions;
    }
    
    public ExecutorTask execute(String paramString, Runnable paramRunnable, InputOutput paramInputOutput)
    {
      return new ET(paramRunnable, paramString, paramInputOutput);
    }
    
    private static final class ET
      extends ExecutorTask
    {
      private RequestProcessor.Task task;
      private int resultValue;
      private final String name;
      private InputOutput io;
      
      public ET(Runnable paramRunnable, String paramString, InputOutput paramInputOutput)
      {
        super();
        resultValue = resultValue;
        name = paramString;
        task = RequestProcessor.getDefault().post(this);
      }
      
      public void stop()
      {
        task.cancel();
      }
      
      public int result()
      {
        waitFinished();
        return resultValue;
      }
      
      public InputOutput getInputOutput()
      {
        return io;
      }
      
      public void run()
      {
        try
        {
          super.run();
        }
        catch (RuntimeException localRuntimeException)
        {
          localRuntimeException.printStackTrace();
          resultValue = 1;
        }
      }
    }
  }
}

/* Location:
 * Qualified Name:     org.openide.execution.ExecutionEngine
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.openide.execution;

import org.openide.util.Task;
import org.openide.windows.InputOutput;

public abstract class ExecutorTask
  extends Task
{
  protected ExecutorTask(Runnable paramRunnable)
  {
    super(paramRunnable);
  }
  
  public abstract void stop();
  
  public abstract int result();
  
  public abstract InputOutput getInputOutput();
}

/* Location:
 * Qualified Name:     org.openide.execution.ExecutorTask
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.openide.execution;

import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.net.URLClassLoader;
import java.security.AllPermission;
import java.security.CodeSource;
import java.security.Permission;
import java.security.PermissionCollection;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.jar.Manifest;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.openide.filesystems.FileObject;
import org.openide.filesystems.FileStateInvalidException;
import org.openide.filesystems.FileSystem;
import org.openide.filesystems.FileUtil;
import org.openide.filesystems.URLMapper;
import org.openide.util.Exceptions;
import org.openide.util.Lookup;
import org.openide.windows.InputOutput;

public class NbClassLoader
  extends URLClassLoader
{
  protected InputOutput inout;
  private HashMap permissionCollections;
  private PermissionCollection defaultPermissions;
  private final boolean fast;
  
  private static ClassLoader systemClassLoader()
  {
    return (ClassLoader)Lookup.getDefault().lookup(ClassLoader.class);
  }
  
  /**
   * @deprecated
   */
  public NbClassLoader()
  {
    super(new URL[0], systemClassLoader());
    fast = false;
  }
  
  /**
   * @deprecated
   */
  public NbClassLoader(InputOutput paramInputOutput)
  {
    super(new URL[0], systemClassLoader());
    fast = false;
    inout = paramInputOutput;
  }
  
  static ThreadLocal<Boolean> f = new ThreadLocal();
  
  public NbClassLoader(FileObject[] paramArrayOfFileObject, ClassLoader paramClassLoader, InputOutput paramInputOutput)
    throws FileStateInvalidException
  {
    super(createRootURLs(paramArrayOfFileObject), paramClassLoader);
    fast = canOptimize(getURLs());
    inout = paramInputOutput;
  }
  
  /**
   * @deprecated
   */
  public NbClassLoader(FileSystem[] paramArrayOfFileSystem)
  {
    super(new URL[0], systemClassLoader(), null);
    fast = false;
    Thread.dumpStack();
  }
  
  /**
   * @deprecated
   */
  public NbClassLoader(FileSystem[] paramArrayOfFileSystem, ClassLoader paramClassLoader)
  {
    super(new URL[0], paramClassLoader);
    fast = false;
    Thread.dumpStack();
  }
  
  public URL getResource(String paramString)
  {
    return super.getResource(paramString.startsWith("/") ? paramString.substring(1) : paramString);
  }
  
  protected Class findClass(String paramString)
    throws ClassNotFoundException
  {
    if ((!fast) && (paramString.indexOf('.') != -1))
    {
      Logger.getLogger(NbClassLoader.class.getName()).log(Level.FINE, "NBFS used!");
      String str1 = paramString.substring(0, paramString.lastIndexOf('.'));
      if (getPackage(str1) == null)
      {
        String str2 = paramString.replace('.', '/') + ".class";
        URL[] arrayOfURL = getURLs();
        for (int i = 0; i < arrayOfURL.length; i++)
        {
          FileObject localFileObject1 = URLMapper.findFileObject(arrayOfURL[i]);
          if (localFileObject1 != null) {
            try
            {
              FileObject localFileObject2 = localFileObject1.getFileObject(str2);
              if (localFileObject2 != null)
              {
                FileObject localFileObject3 = localFileObject1.getFileObject("META-INF/MANIFEST.MF");
                if (localFileObject3 == null) {
                  localFileObject3 = localFileObject1.getFileObject("meta-inf/manifest.mf");
                }
                if (localFileObject3 != null)
                {
                  Manifest localManifest = new Manifest();
                  InputStream localInputStream = localFileObject3.getInputStream();
                  try
                  {
                    localManifest.read(localInputStream);
                  }
                  finally
                  {
                    localInputStream.close();
                  }
                  definePackage(str1, localManifest, arrayOfURL[i]);
                }
                break;
              }
            }
            catch (IOException localIOException)
            {
              Exceptions.attachLocalizedMessage(localIOException, arrayOfURL[i].toString());
              
              Exceptions.printStackTrace(localIOException);
            }
          }
        }
      }
    }
    return super.findClass(paramString);
  }
  
  public void setDefaultPermissions(PermissionCollection paramPermissionCollection)
  {
    if ((paramPermissionCollection != null) && (!paramPermissionCollection.isReadOnly())) {
      paramPermissionCollection.setReadOnly();
    }
    defaultPermissions = paramPermissionCollection;
  }
  
  protected final synchronized PermissionCollection getPermissions(CodeSource paramCodeSource)
  {
    if (permissionCollections != null)
    {
      PermissionCollection localPermissionCollection = (PermissionCollection)permissionCollections.get(paramCodeSource);
      if (localPermissionCollection != null) {
        return localPermissionCollection;
      }
    }
    return createPermissions(paramCodeSource, inout);
  }
  
  private PermissionCollection createPermissions(CodeSource paramCodeSource, InputOutput paramInputOutput)
  {
    PermissionCollection localPermissionCollection;
    if (paramInputOutput == null)
    {
      if (defaultPermissions != null) {
        localPermissionCollection = defaultPermissions;
      } else {
        localPermissionCollection = super.getPermissions(paramCodeSource);
      }
    }
    else
    {
      ExecutionEngine localExecutionEngine = ExecutionEngine.getDefault();
      localPermissionCollection = localExecutionEngine.createPermissions(paramCodeSource, paramInputOutput);
      if (defaultPermissions != null) {
        addAllPermissions(localPermissionCollection, defaultPermissions);
      } else {
        localPermissionCollection.add(new AllPermission());
      }
    }
    if (permissionCollections == null) {
      permissionCollections = new HashMap(7);
    }
    permissionCollections.put(paramCodeSource, localPermissionCollection);
    return localPermissionCollection;
  }
  
  private static void addAllPermissions(PermissionCollection paramPermissionCollection1, PermissionCollection paramPermissionCollection2)
  {
    Enumeration localEnumeration = paramPermissionCollection2.elements();
    while (localEnumeration.hasMoreElements()) {
      paramPermissionCollection1.add((Permission)localEnumeration.nextElement());
    }
  }
  
  private static URL[] createRootURLs(FileObject[] paramArrayOfFileObject)
    throws FileStateInvalidException
  {
    URL[] arrayOfURL = new URL[paramArrayOfFileObject.length];
    for (int i = 0; i < paramArrayOfFileObject.length; i++) {
      arrayOfURL[i] = paramArrayOfFileObject[i].getURL();
    }
    return arrayOfURL;
  }
  
  private static boolean canOptimize(URL[] paramArrayOfURL)
  {
    assert (paramArrayOfURL != null);
    for (int i = 0; i < paramArrayOfURL.length; i++)
    {
      Object localObject = paramArrayOfURL[i];
      URL localURL = FileUtil.getArchiveFile((URL)localObject);
      if (localURL != null)
      {
        if (!((URL)localObject).toExternalForm().endsWith("!/")) {
          return false;
        }
        localObject = localURL;
      }
      if (!"file".equals(((URL)localObject).getProtocol())) {
        return false;
      }
    }
    return true;
  }
}

/* Location:
 * Qualified Name:     org.openide.execution.NbClassLoader
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.openide.execution;

import java.util.LinkedList;
import org.openide.filesystems.FileSystem.Environment;

final class NbClassPath$1Env
  extends FileSystem.Environment
{
  public void addClassPath(String paramString)
  {
    val$res.add(paramString);
  }
}

/* Location:
 * Qualified Name:     org.openide.execution.NbClassPath.1Env
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.openide.execution;

import java.io.File;
import java.io.Serializable;
import java.util.Enumeration;
import java.util.LinkedList;
import java.util.Locale;
import java.util.StringTokenizer;
import org.openide.filesystems.EnvironmentNotSupportedException;
import org.openide.filesystems.FileObject;
import org.openide.filesystems.FileSystem;
import org.openide.filesystems.FileSystem.Environment;
import org.openide.filesystems.FileSystemCapability;
import org.openide.filesystems.FileUtil;
import org.openide.util.Lookup;

public final class NbClassPath
  implements Serializable
{
  static final long serialVersionUID = -8458093409814321744L;
  private Object[] items;
  private String classpath;
  
  public NbClassPath(String[] paramArrayOfString)
  {
    items = paramArrayOfString;
  }
  
  public NbClassPath(File[] paramArrayOfFile)
  {
    items = paramArrayOfFile;
  }
  
  private NbClassPath(Object[] paramArrayOfObject)
  {
    items = paramArrayOfObject;
  }
  
  public NbClassPath(String paramString)
  {
    items = new Exception[0];
    classpath = paramString;
    if (paramString.indexOf(' ') >= 0)
    {
      if (paramString.startsWith("\"")) {
        return;
      }
      StringBuffer localStringBuffer = new StringBuffer(paramString);
      localStringBuffer.insert(0, '"');
      localStringBuffer.append('"');
      classpath = localStringBuffer.toString();
    }
  }
  
  /**
   * @deprecated
   */
  public static NbClassPath createRepositoryPath()
  {
    Thread.dumpStack();
    return createRepositoryPath(FileSystemCapability.ALL);
  }
  
  /**
   * @deprecated
   */
  public static NbClassPath createRepositoryPath(FileSystemCapability paramFileSystemCapability)
  {
    Thread.dumpStack();
    LinkedList localLinkedList = new LinkedList();
    
    FileSystem.Environment local1Env = new FileSystem.Environment()
    {
      public void addClassPath(String paramAnonymousString)
      {
        val$res.add(paramAnonymousString);
      }
    };
    Enumeration localEnumeration = paramFileSystemCapability.fileSystems();
    while (localEnumeration.hasMoreElements()) {
      try
      {
        FileSystem localFileSystem = (FileSystem)localEnumeration.nextElement();
        localFileSystem.prepareEnvironment(local1Env);
      }
      catch (EnvironmentNotSupportedException localEnvironmentNotSupportedException)
      {
        localLinkedList.add(localEnvironmentNotSupportedException);
      }
    }
    return new NbClassPath(localLinkedList.toArray());
  }
  
  /**
   * @deprecated
   */
  public static NbClassPath createLibraryPath()
  {
    Thread.dumpStack();
    
    ExecutionEngine localExecutionEngine = (ExecutionEngine)Lookup.getDefault().lookup(ExecutionEngine.class);
    if (localExecutionEngine != null) {
      return localExecutionEngine.createLibraryPath();
    }
    return new NbClassPath(new File[0]);
  }
  
  /**
   * @deprecated
   */
  public static NbClassPath createClassPath()
  {
    Thread.dumpStack();
    
    String str1 = System.getProperty("java.class.path");
    if ((str1 == null) || (str1.length() == 0)) {
      return new NbClassPath("");
    }
    StringBuffer localStringBuffer = new StringBuffer(str1.length());
    StringTokenizer localStringTokenizer = new StringTokenizer(str1, File.pathSeparator);
    int i = 0;
    while (localStringTokenizer.hasMoreTokens())
    {
      String str2 = localStringTokenizer.nextToken();
      if (!str2.endsWith("openide-compat.jar"))
      {
        if (i != 0) {
          localStringBuffer.append(File.pathSeparatorChar);
        } else {
          i = 1;
        }
        localStringBuffer.append(str2);
      }
    }
    return new NbClassPath(localStringBuffer.toString());
  }
  
  /**
   * @deprecated
   */
  public static NbClassPath createBootClassPath()
  {
    Thread.dumpStack();
    
    String str1 = System.getProperty("sun.boot.class.path");
    StringBuffer localStringBuffer = str1 != null ? new StringBuffer(str1) : new StringBuffer();
    
    String str2 = System.getProperty("java.ext.dirs");
    StringTokenizer localStringTokenizer;
    if (str2 != null) {
      for (localStringTokenizer = new StringTokenizer(str2, File.pathSeparator); localStringTokenizer.hasMoreTokens();)
      {
        File localFile = new File(localStringTokenizer.nextToken());
        File[] arrayOfFile = localFile.listFiles();
        if (arrayOfFile != null) {
          for (int i = 0; i < arrayOfFile.length; i++)
          {
            String str3 = arrayOfFile[i].getName().toLowerCase(Locale.US);
            if ((str3.endsWith(".zip")) || (str3.endsWith(".jar")))
            {
              if (localStringBuffer.length() > 0) {
                localStringBuffer.append(File.pathSeparatorChar);
              }
              localStringBuffer.append(arrayOfFile[i].getPath());
            }
          }
        }
      }
    }
    return new NbClassPath(localStringBuffer.toString());
  }
  
  /**
   * @deprecated
   */
  public static File toFile(FileObject paramFileObject)
  {
    Thread.dumpStack();
    return FileUtil.toFile(paramFileObject);
  }
  
  public Exception[] getExceptions()
  {
    try
    {
      return (Exception[])items;
    }
    catch (ClassCastException localClassCastException)
    {
      synchronized (this)
      {
        getClassPath();
        
        int i = 0;
        for (int j = 0; j < items.length; j++) {
          if (items[j] != null) {
            items[(i++)] = items[j];
          }
        }
        Exception[] arrayOfException = new Exception[i];
        System.arraycopy(items, 0, arrayOfException, 0, i);
        items = arrayOfException;
        return arrayOfException;
      }
    }
  }
  
  public String getClassPath()
  {
    if (classpath != null) {
      return classpath;
    }
    synchronized (this)
    {
      if (classpath != null) {
        return classpath;
      }
      if (items.length == 0) {
        return classpath = "";
      }
      StringBuffer localStringBuffer = new StringBuffer();
      int i = 0;
      for (int j = 0; j < items.length; j++)
      {
        Object localObject1 = items[j];
        if ((localObject1 != null) && (((localObject1 instanceof String)) || ((localObject1 instanceof File))))
        {
          if (i != 0) {
            localStringBuffer.append(File.pathSeparatorChar);
          } else {
            i = 1;
          }
          localStringBuffer.append(localObject1.toString());
          items[j] = null;
        }
      }
      String str;
      if ((str = localStringBuffer.toString()).indexOf(' ') >= 0)
      {
        localStringBuffer.insert(0, '"');
        localStringBuffer.append('"');
        classpath = localStringBuffer.toString();
      }
      else
      {
        classpath = str;
      }
      return classpath;
    }
  }
  
  public boolean equals(Object paramObject)
  {
    if (!(paramObject instanceof NbClassPath)) {
      return false;
    }
    NbClassPath localNbClassPath = (NbClassPath)paramObject;
    return getClassPath().equals(localNbClassPath.getClassPath());
  }
}

/* Location:
 * Qualified Name:     org.openide.execution.NbClassPath
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.openide.execution;

import java.io.File;
import java.io.IOException;
import java.io.Serializable;
import java.text.Format;
import java.util.Arrays;
import java.util.Map;
import java.util.logging.Logger;
import org.openide.util.Utilities;

public final class NbProcessDescriptor
  implements Serializable
{
  private static final long serialVersionUID = -4535211234565221486L;
  private static Logger execLog;
  private String processName;
  private String arguments;
  private String info;
  
  public NbProcessDescriptor(String paramString1, String paramString2)
  {
    this(paramString1, paramString2, null);
  }
  
  public NbProcessDescriptor(String paramString1, String paramString2, String paramString3)
  {
    processName = paramString1;
    arguments = paramString2;
    info = paramString3;
  }
  
  public String getProcessName()
  {
    return processName;
  }
  
  public String getArguments()
  {
    return arguments;
  }
  
  public String getInfo()
  {
    return info;
  }
  
  public Process exec(Format paramFormat, String[] paramArrayOfString, File paramFile)
    throws IOException
  {
    return exec(paramFormat, paramArrayOfString, false, paramFile);
  }
  
  public Process exec(Format paramFormat, String[] paramArrayOfString, boolean paramBoolean, File paramFile)
    throws IOException
  {
    String str1 = paramFormat == null ? arguments : paramFormat.format(arguments);
    String[] arrayOfString1 = parseArguments(str1);
    String[] arrayOfString2 = null;
    
    paramArrayOfString = substituteEnv(paramFormat, paramArrayOfString);
    
    arrayOfString2 = new String[arrayOfString1.length + 1];
    arrayOfString2[0] = (paramFormat == null ? processName : paramFormat.format(processName));
    System.arraycopy(arrayOfString1, 0, arrayOfString2, 1, arrayOfString1.length);
    
    logArgs(arrayOfString2);
    
    ProcessBuilder localProcessBuilder = new ProcessBuilder(arrayOfString2);
    if (paramArrayOfString != null)
    {
      Map localMap = localProcessBuilder.environment();
      if (!paramBoolean) {
        localMap.clear();
      }
      for (int i = 0; i < paramArrayOfString.length; i++)
      {
        String str2 = paramArrayOfString[i];
        int j = str2.indexOf('=');
        if (j == -1) {
          throw new IOException("No equal sign in name=value: " + str2);
        }
        localMap.put(str2.substring(0, j), str2.substring(j + 1));
      }
    }
    if (paramFile != null) {
      localProcessBuilder.directory(paramFile);
    }
    return localProcessBuilder.start();
  }
  
  private static void logArgs(String[] paramArrayOfString)
  {
    getExecLog().fine("Running: " + Arrays.asList(paramArrayOfString));
  }
  
  public Process exec(Format paramFormat, String[] paramArrayOfString)
    throws IOException
  {
    return exec(paramFormat, paramArrayOfString, null);
  }
  
  public Process exec(Format paramFormat)
    throws IOException
  {
    return exec(paramFormat, null);
  }
  
  public Process exec()
    throws IOException
  {
    return exec(null, null);
  }
  
  public int hashCode()
  {
    return processName.hashCode() + arguments.hashCode();
  }
  
  public boolean equals(Object paramObject)
  {
    if (!(paramObject instanceof NbProcessDescriptor)) {
      return false;
    }
    NbProcessDescriptor localNbProcessDescriptor = (NbProcessDescriptor)paramObject;
    return (processName.equals(processName)) && (arguments.equals(arguments));
  }
  
  private static String[] parseArguments(String paramString)
  {
    return Utilities.parseParameters(paramString);
  }
  
  private static Logger getExecLog()
  {
    if (execLog == null) {
      execLog = Logger.getLogger(NbProcessDescriptor.class.getName());
    }
    return execLog;
  }
  
  private static String[] substituteEnv(Format paramFormat, String[] paramArrayOfString)
  {
    if ((paramArrayOfString == null) || (paramArrayOfString.length == 0) || (paramFormat == null)) {
      return paramArrayOfString;
    }
    String[] arrayOfString = new String[paramArrayOfString.length];
    StringBuffer localStringBuffer = new StringBuffer();
    for (int i = 0; i < paramArrayOfString.length; i++)
    {
      arrayOfString[i] = paramArrayOfString[i];
      if (arrayOfString[i] != null)
      {
        int j = arrayOfString[i].indexOf('=');
        if (j >= 0)
        {
          String str1 = arrayOfString[i].substring(j + 1);
          String str2 = arrayOfString[i].substring(0, j);
          localStringBuffer.append(str2).append('=').append(paramFormat.format(str1));
          arrayOfString[i] = localStringBuffer.toString();
          localStringBuffer.setLength(0);
        }
      }
    }
    return arrayOfString;
  }
}

/* Location:
 * Qualified Name:     org.openide.execution.NbProcessDescriptor
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.openide.execution;

public class ScriptType$Context {}

/* Location:
 * Qualified Name:     org.openide.execution.ScriptType.Context
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.openide.execution;

import java.io.Reader;
import java.lang.reflect.InvocationTargetException;
import java.util.Collections;
import java.util.Enumeration;
import org.openide.ServiceType;
import org.openide.ServiceType.Registry;
import org.openide.filesystems.FileObject;
import org.openide.util.Lookup;
import org.openide.util.Lookup.Result;
import org.openide.util.Lookup.Template;

/**
 * @deprecated
 */
public abstract class ScriptType
  extends ServiceType
{
  private static final long serialVersionUID = 4893207884933024341L;
  
  public abstract boolean acceptFileObject(FileObject paramFileObject);
  
  public abstract Object eval(Reader paramReader, Context paramContext)
    throws InvocationTargetException;
  
  public final Object eval(Reader paramReader)
    throws InvocationTargetException
  {
    return eval(paramReader, getDefaultContext());
  }
  
  public abstract Object eval(String paramString, Context paramContext)
    throws InvocationTargetException;
  
  public final Object eval(String paramString)
    throws InvocationTargetException
  {
    return eval(paramString, getDefaultContext());
  }
  
  public abstract void exec(Reader paramReader, Context paramContext)
    throws InvocationTargetException;
  
  public final void exec(Reader paramReader)
    throws InvocationTargetException
  {
    exec(paramReader, getDefaultContext());
  }
  
  public abstract void exec(String paramString, Context paramContext)
    throws InvocationTargetException;
  
  public final void exec(String paramString)
    throws InvocationTargetException
  {
    exec(paramString, getDefaultContext());
  }
  
  public abstract void addVariable(String paramString, Object paramObject);
  
  /**
   * @deprecated
   */
  public static Enumeration scriptTypes()
  {
    return Collections.enumeration(Lookup.getDefault().lookup(new Lookup.Template(ScriptType.class)).allInstances());
  }
  
  /**
   * @deprecated
   */
  public static ScriptType find(Class paramClass)
  {
    return (ScriptType)Lookup.getDefault().lookup(paramClass);
  }
  
  public static ScriptType find(String paramString)
  {
    ServiceType localServiceType = ((ServiceType.Registry)Lookup.getDefault().lookup(ServiceType.Registry.class)).find(paramString);
    if ((localServiceType instanceof ScriptType)) {
      return (ScriptType)localServiceType;
    }
    return null;
  }
  
  /**
   * @deprecated
   */
  public static ScriptType getDefault()
  {
    Enumeration localEnumeration = scriptTypes();
    if (localEnumeration.hasMoreElements()) {
      return (ScriptType)localEnumeration.nextElement();
    }
    throw new RuntimeException("No script type registered.");
  }
  
  static Context getDefaultContext()
  {
    return new Context();
  }
  
  public static class Context {}
}

/* Location:
 * Qualified Name:     org.openide.execution.ScriptType
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
1

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd