org.tizen.injector_1.0.0.201310291329

16:50:09.916 INFO  jd.cli.Main - Decompiling org.tizen.injector_1.0.0.201310291329.jar
package org.tizen.injector;

import java.io.PrintStream;

public class DebugLog
{
  public static void log(Object paramObject)
  {
    System.out.println("[INJECTOR] " + paramObject);
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.DebugLog
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector;

import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.Shell;

class DialogRun
  implements Runnable
{
  public Shell shell;
  public String title;
  public String message;
  public int result;
  
  public void run()
  {
    MessageBox localMessageBox = new MessageBox(shell, 200);
    localMessageBox.setText(title);
    localMessageBox.setMessage(message);
    result = localMessageBox.open();
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.DialogRun
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector;

import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;

public class Injector
  extends AbstractUIPlugin
{
  public static final String PLUGIN_ID = "org.tizen.injector";
  private static Injector plugin;
  
  public void start(BundleContext paramBundleContext)
    throws Exception
  {
    super.start(paramBundleContext);
    plugin = this;
  }
  
  public void stop(BundleContext paramBundleContext)
    throws Exception
  {
    plugin = null;
    super.stop(paramBundleContext);
  }
  
  public static Injector getDefault()
  {
    return plugin;
  }
  
  public ImageDescriptor getImageDescriptor(String paramString)
  {
    return imageDescriptorFromPlugin("org.tizen.injector", paramString);
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.Injector
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector;

import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.Shell;

class InjectorDialog$1
  implements Runnable
{
  InjectorDialog$1(Shell paramShell, String paramString1, String paramString2) {}
  
  public void run()
  {
    MessageBox localMessageBox = new MessageBox(val$s, 34);
    localMessageBox.setText(val$title);
    localMessageBox.setMessage(val$message);
    localMessageBox.open();
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.InjectorDialog.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector;

import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.Shell;

class InjectorDialog$2
  implements Runnable
{
  InjectorDialog$2(Shell paramShell, String paramString1, String paramString2) {}
  
  public void run()
  {
    MessageBox localMessageBox = new MessageBox(val$s, 33);
    localMessageBox.setText(val$title);
    localMessageBox.setMessage(val$message);
    localMessageBox.open();
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.InjectorDialog.2
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector;

import java.io.PrintStream;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.Shell;

public abstract class InjectorDialog
{
  public static String TITLE = "Event Injector";
  
  public static void openInfoDialog(String paramString)
  {
    openInfoDialog(new Shell(), paramString);
  }
  
  public static void openInfoDialog(Shell paramShell, String paramString)
  {
    Shell localShell;
    if (paramShell == null) {
      localShell = new Shell();
    } else {
      localShell = paramShell;
    }
    openInfoDialog(localShell, "Info", paramString);
  }
  
  public static void openInfoDialog(Shell paramShell, final String paramString1, final String paramString2)
  {
    Shell localShell;
    if (paramShell == null) {
      localShell = new Shell();
    } else {
      localShell = paramShell;
    }
    Display.getDefault().syncExec(new Runnable()
    {
      public void run()
      {
        MessageBox localMessageBox = new MessageBox(InjectorDialog.this, 34);
        localMessageBox.setText(paramString1);
        localMessageBox.setMessage(paramString2);
        localMessageBox.open();
      }
    });
  }
  
  public static boolean openSelectDialog(Shell paramShell, String paramString1, String paramString2)
  {
    Shell localShell;
    if (paramShell == null) {
      localShell = new Shell();
    } else {
      localShell = paramShell;
    }
    DialogRun localDialogRun = new DialogRun();
    shell = localShell;
    title = paramString1;
    message = paramString2;
    Display.getDefault().syncExec(localDialogRun);
    System.out.println(result);
    return result == 64;
  }
  
  public static void openErrorDialog(String paramString)
  {
    openErrorDialog(new Shell(), paramString);
  }
  
  public static void openErrorDialog(Shell paramShell, String paramString)
  {
    Shell localShell;
    if (paramShell == null) {
      localShell = new Shell();
    } else {
      localShell = paramShell;
    }
    openErrorDialog(localShell, "Error", paramString);
  }
  
  public static void openErrorDialog(Shell paramShell, final String paramString1, final String paramString2)
  {
    Shell localShell;
    if (paramShell == null) {
      localShell = new Shell();
    } else {
      localShell = paramShell;
    }
    Display.getDefault().syncExec(new Runnable()
    {
      public void run()
      {
        MessageBox localMessageBox = new MessageBox(InjectorDialog.this, 33);
        localMessageBox.setText(paramString1);
        localMessageBox.setMessage(paramString2);
        localMessageBox.open();
      }
    });
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.InjectorDialog
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.control;

import org.eclipse.jface.viewers.CellEditor;
import org.eclipse.jface.viewers.ComboBoxCellEditor;
import org.eclipse.jface.viewers.ICellModifier;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.TextCellEditor;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.TableItem;
import org.tizen.injector.model.ITableVO;

public class TableViewCellModifier
  implements ICellModifier
{
  private TableViewer viewer;
  private String[] columnNames;
  CellEditor[] cellEditors;
  
  public TableViewCellModifier(TableViewer paramTableViewer)
  {
    viewer = paramTableViewer;
    columnNames = getColumnNames();
    viewer.setColumnProperties(columnNames);
  }
  
  private String[] getColumnNames()
  {
    TableColumn[] arrayOfTableColumn = viewer.getTable().getColumns();
    String[] arrayOfString = new String[arrayOfTableColumn.length];
    for (int i = 0; i < arrayOfString.length; i++) {
      arrayOfString[i] = arrayOfTableColumn[i].getText();
    }
    return arrayOfString;
  }
  
  public boolean canModify(Object paramObject, String paramString)
  {
    return true;
  }
  
  public Object getValue(Object paramObject, String paramString)
  {
    Object localObject = null;
    int i = getColumnIndex(paramString);
    ITableVO localITableVO = (ITableVO)paramObject;
    CellEditor localCellEditor = getCellEditor(i);
    if ((localCellEditor instanceof ComboBoxCellEditor)) {
      localObject = localITableVO.getColumnValue(i);
    } else if ((localCellEditor instanceof TextCellEditor)) {
      localObject = localITableVO.getColumnValue(i);
    } else {
      localObject = "";
    }
    return localObject;
  }
  
  private CellEditor getCellEditor(int paramInt)
  {
    if (cellEditors == null) {
      cellEditors = viewer.getCellEditors();
    }
    return cellEditors[paramInt];
  }
  
  private int getColumnIndex(String paramString)
  {
    for (int i = 0; i < columnNames.length; i++) {
      if (columnNames[i].equals(paramString)) {
        return i;
      }
    }
    return 0;
  }
  
  public void modify(Object paramObject1, String paramString, Object paramObject2)
  {
    int i = getColumnIndex(paramString);
    ITableVO localITableVO = (ITableVO)((TableItem)paramObject1).getData();
    if ((cellEditors[i] instanceof ComboBoxCellEditor))
    {
      if (((Integer)paramObject2).intValue() < 0) {
        return;
      }
      localITableVO.setColumnValue(i, paramObject2);
    }
    else if ((cellEditors[i] instanceof TextCellEditor))
    {
      localITableVO.setColumnValue(i, paramObject2);
    }
    viewer.update(localITableVO, null);
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.control.TableViewCellModifier
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.control;

import java.util.Comparator;

class TableViewColumnSorter$1
  implements Comparator<String>
{
  TableViewColumnSorter$1(TableViewColumnSorter paramTableViewColumnSorter) {}
  
  public int compare(String paramString1, String paramString2)
  {
    paramString1 = paramString1 == null ? "" : paramString1;
    paramString2 = paramString2 == null ? "" : paramString2;
    return paramString1.compareTo(paramString2);
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.control.TableViewColumnSorter.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.control;

import java.util.Comparator;

class TableViewColumnSorter$2
  implements Comparator<Integer>
{
  TableViewColumnSorter$2(TableViewColumnSorter paramTableViewColumnSorter) {}
  
  public int compare(Integer paramInteger1, Integer paramInteger2)
  {
    return paramInteger1 == paramInteger2 ? 0 : paramInteger1.intValue() > paramInteger2.intValue() ? 1 : -1;
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.control.TableViewColumnSorter.2
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.control;

import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;

class TableViewColumnSorter$3
  extends SelectionAdapter
{
  TableViewColumnSorter$3(TableViewColumnSorter paramTableViewColumnSorter) {}
  
  public void widgetSelected(SelectionEvent paramSelectionEvent)
  {
    TableColumn localTableColumn = (TableColumn)paramSelectionEvent.getSource();
    TableViewColumnSorter.access$0(this$0, localTableColumn);
    TableViewColumnSorter.access$1(this$0, localTableColumn);
    TableViewColumnSorter.access$2(this$0).setCursor(this$0.waitCursor);
    TableViewColumnSorter.access$3(this$0).refresh();
    TableViewColumnSorter.access$2(this$0).setCursor(null);
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.control.TableViewColumnSorter.3
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.control;

import java.util.Comparator;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerSorter;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Cursor;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.tizen.injector.model.ITableVO;

public class TableViewColumnSorter
  extends ViewerSorter
{
  private static final String COLUMN_INDEX_KEY = "COLUMN_INDEX";
  private static final String HEADER_TEXT_KEY = "HEADER_TEXT";
  private static final String TAG_DESCENDING = "?";
  private static final String TAG_ASCENDING = "?";
  private TableViewer viewer;
  private Table table;
  private TableColumn[] columns;
  Cursor waitCursor;
  private Comparator<String> stringComparator = new Comparator()
  {
    public int compare(String paramAnonymousString1, String paramAnonymousString2)
    {
      paramAnonymousString1 = paramAnonymousString1 == null ? "" : paramAnonymousString1;
      paramAnonymousString2 = paramAnonymousString2 == null ? "" : paramAnonymousString2;
      return paramAnonymousString1.compareTo(paramAnonymousString2);
    }
  };
  private Comparator<Integer> numberComparator = new Comparator()
  {
    public int compare(Integer paramAnonymousInteger1, Integer paramAnonymousInteger2)
    {
      return paramAnonymousInteger1 == paramAnonymousInteger2 ? 0 : paramAnonymousInteger1.intValue() > paramAnonymousInteger2.intValue() ? 1 : -1;
    }
  };
  
  public TableViewColumnSorter(TableViewer paramTableViewer)
  {
    viewer = paramTableViewer;
    table = paramTableViewer.getTable();
    columns = paramTableViewer.getTable().getColumns();
    createCursor();
    createSelectionListener(columns);
  }
  
  private void createCursor()
  {
    waitCursor = Display.getCurrent().getSystemCursor(1);
  }
  
  public int compare(Viewer paramViewer, Object paramObject1, Object paramObject2)
  {
    TableColumn localTableColumn = table.getSortColumn();
    int i = -1;
    if (localTableColumn == null) {
      return 0;
    }
    i = ((Integer)localTableColumn.getData("COLUMN_INDEX")).intValue();
    Object localObject1 = ((ITableVO)paramObject1).getColumnValue(i);
    Object localObject2 = ((ITableVO)paramObject2).getColumnValue(i);
    int j = compare(localObject1, localObject2);
    if (table.getSortDirection() == 128) {
      return j;
    }
    return -j;
  }
  
  public int compare(Object paramObject1, Object paramObject2)
  {
    if ((paramObject1 instanceof Integer)) {
      return numberComparator.compare((Integer)paramObject1, (Integer)paramObject2);
    }
    return stringComparator.compare(paramObject1.toString(), paramObject2.toString());
  }
  
  private void createSelectionListener(TableColumn[] paramArrayOfTableColumn)
  {
    for (int i = 0; i < paramArrayOfTableColumn.length; i++)
    {
      paramArrayOfTableColumn[i].setData("COLUMN_INDEX", Integer.valueOf(i));
      paramArrayOfTableColumn[i].setData("HEADER_TEXT", paramArrayOfTableColumn[i].getText());
      paramArrayOfTableColumn[i].addSelectionListener(new SelectionAdapter()
      {
        public void widgetSelected(SelectionEvent paramAnonymousSelectionEvent)
        {
          TableColumn localTableColumn = (TableColumn)paramAnonymousSelectionEvent.getSource();
          TableViewColumnSorter.this.clearColumnHeader(localTableColumn);
          TableViewColumnSorter.this.renderColumnHeader(localTableColumn);
          table.setCursor(waitCursor);
          viewer.refresh();
          table.setCursor(null);
        }
      });
    }
  }
  
  private void renderColumnHeader(TableColumn paramTableColumn)
  {
    int i = table.getSortDirection() == 128 ? 1024 : 128;
    table.setSortDirection(i);
    table.setSortColumn(paramTableColumn);
    String str1 = (String)paramTableColumn.getData("HEADER_TEXT");
    String str2 = i == 128 ? "?" : "?";
    paramTableColumn.setText(str1 + " " + str2);
  }
  
  private void clearColumnHeader(TableColumn paramTableColumn)
  {
    TableColumn localTableColumn = table.getSortColumn();
    if (localTableColumn == null) {
      return;
    }
    localTableColumn.setText((String)localTableColumn.getData("HEADER_TEXT"));
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.control.TableViewColumnSorter
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.control;

import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.Viewer;
import org.tizen.injector.model.ITableModel;

public class TableViewContentProvider
  implements IStructuredContentProvider
{
  public Object[] getElements(Object paramObject)
  {
    return ((ITableModel)paramObject).getDatas();
  }
  
  public void dispose() {}
  
  public void inputChanged(Viewer paramViewer, Object paramObject1, Object paramObject2) {}
}

/* Location:
 * Qualified Name:     org.tizen.injector.control.TableViewContentProvider
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.control;

import java.lang.reflect.Field;
import java.lang.reflect.Method;
import org.eclipse.jface.viewers.CellEditor;
import org.eclipse.jface.viewers.ColumnLabelProvider;
import org.eclipse.jface.viewers.ComboBoxCellEditor;
import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.swt.graphics.Image;
import org.tizen.injector.model.ITableVO;

public class TableViewLabelProvider
  extends ColumnLabelProvider
  implements ITableLabelProvider
{
  private TableViewer viewer;
  CellEditor[] cellEditors;
  private Field[] fields;
  
  public TableViewLabelProvider() {}
  
  public TableViewLabelProvider(TableViewer paramTableViewer)
  {
    setViewer(paramTableViewer);
    cellEditors = paramTableViewer.getCellEditors();
  }
  
  private int getColumnIndex(int paramInt)
  {
    return fields.length > paramInt ? paramInt : fields.length;
  }
  
  public Image getColumnImage(Object paramObject, int paramInt)
  {
    return null;
  }
  
  private CellEditor getCellEditor(int paramInt)
  {
    if (cellEditors == null) {
      return null;
    }
    return cellEditors[paramInt];
  }
  
  public String getColumnText(Object paramObject, int paramInt)
  {
    Object localObject1 = null;
    Object localObject2;
    Object localObject3;
    if ((paramObject instanceof ITableVO))
    {
      ITableVO localITableVO = (ITableVO)paramObject;
      if (cellEditors != null)
      {
        localObject2 = getCellEditor(paramInt);
        if ((localObject2 instanceof ComboBoxCellEditor))
        {
          localObject3 = (ComboBoxCellEditor)localObject2;
          String[] arrayOfString = ((ComboBoxCellEditor)localObject3).getItems();
          int j = ((Integer)localITableVO.getColumnValue(paramInt)).intValue();
          if (j < 0) {
            localObject1 = null;
          } else if (j > arrayOfString.length) {
            localObject1 = arrayOfString[0];
          } else {
            localObject1 = arrayOfString[j];
          }
        }
        else
        {
          localObject1 = localITableVO.getColumnValue(paramInt);
        }
      }
      else
      {
        localObject1 = localITableVO.getColumnValue(paramInt);
      }
    }
    else
    {
      if (fields == null) {
        fields = paramObject.getClass().getDeclaredFields();
      }
      int i = getColumnIndex(paramInt);
      localObject2 = fields[i].getName().substring(0, 1).toUpperCase() + fields[i].getName().substring(1, fields[i].getName().length());
      try
      {
        localObject3 = paramObject.getClass().getMethod("get" + (String)localObject2, new Class[0]);
        localObject1 = ((Method)localObject3).invoke(paramObject, new Object[0]);
      }
      catch (NoSuchMethodException localNoSuchMethodException)
      {
        return "NoSuchMethodException";
      }
      catch (Exception localException)
      {
        return "";
      }
    }
    return localObject1 == null ? "" : String.valueOf(localObject1);
  }
  
  public TableViewer getViewer()
  {
    return viewer;
  }
  
  public void setViewer(TableViewer paramTableViewer)
  {
    viewer = paramTableViewer;
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.control.TableViewLabelProvider
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.model;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import org.eclipse.ui.IMemento;
import org.eclipse.ui.XMLMemento;

public abstract class AbstractTableModel
  implements ITableModel
{
  private static final String TAG_ROOT = "root";
  private Collection<AbstractTableVO> inventory = new ArrayList();
  protected AbstractTableVO source;
  private boolean isDirty = false;
  
  public AbstractTableModel(AbstractTableVO paramAbstractTableVO)
  {
    source = paramAbstractTableVO;
  }
  
  public ITableVO[] getDatas()
  {
    if (inventory == null) {
      return null;
    }
    return (ITableVO[])inventory.toArray(new AbstractTableVO[inventory.size()]);
  }
  
  public void add(Collection<AbstractTableVO> paramCollection)
  {
    if (paramCollection == null) {
      return;
    }
    inventory.addAll(paramCollection);
  }
  
  public int size()
  {
    return inventory.size();
  }
  
  public void add(AbstractTableVO paramAbstractTableVO)
  {
    inventory.add(paramAbstractTableVO);
  }
  
  public void remove(Collection<AbstractTableVO> paramCollection)
  {
    if (paramCollection == null) {
      return;
    }
    inventory.removeAll(paramCollection);
  }
  
  public void remove(AbstractTableVO paramAbstractTableVO)
  {
    inventory.remove(paramAbstractTableVO);
  }
  
  public void clear()
  {
    inventory.clear();
  }
  
  /* Error */
  public void load(String paramString)
  {
    // Byte code:
    //   0: aload_0
    //   1: getfield 29	org/tizen/injector/model/AbstractTableModel:inventory	Ljava/util/Collection;
    //   4: ifnull +10 -> 14
    //   7: aload_0
    //   8: getfield 33	org/tizen/injector/model/AbstractTableModel:source	Lorg/tizen/injector/model/AbstractTableVO;
    //   11: ifnonnull +4 -> 15
    //   14: return
    //   15: aconst_null
    //   16: astore_2
    //   17: new 73	java/io/FileReader
    //   20: dup
    //   21: new 75	java/io/File
    //   24: dup
    //   25: aload_1
    //   26: invokespecial 77	java/io/File:<init>	(Ljava/lang/String;)V
    //   29: invokespecial 79	java/io/FileReader:<init>	(Ljava/io/File;)V
    //   32: astore_2
    //   33: aload_0
    //   34: aload_2
    //   35: invokestatic 82	org/eclipse/ui/XMLMemento:createReadRoot	(Ljava/io/Reader;)Lorg/eclipse/ui/XMLMemento;
    //   38: invokespecial 88	org/tizen/injector/model/AbstractTableModel:load	(Lorg/eclipse/ui/XMLMemento;)V
    //   41: goto +78 -> 119
    //   44: astore_3
    //   45: aload_3
    //   46: invokevirtual 91	java/io/FileNotFoundException:printStackTrace	()V
    //   49: aload_2
    //   50: ifnull +87 -> 137
    //   53: aload_2
    //   54: invokevirtual 96	java/io/FileReader:close	()V
    //   57: goto +80 -> 137
    //   60: astore 5
    //   62: aload 5
    //   64: invokevirtual 99	java/io/IOException:printStackTrace	()V
    //   67: goto +70 -> 137
    //   70: astore_3
    //   71: aload_3
    //   72: invokevirtual 102	java/lang/Exception:printStackTrace	()V
    //   75: aload_2
    //   76: ifnull +61 -> 137
    //   79: aload_2
    //   80: invokevirtual 96	java/io/FileReader:close	()V
    //   83: goto +54 -> 137
    //   86: astore 5
    //   88: aload 5
    //   90: invokevirtual 99	java/io/IOException:printStackTrace	()V
    //   93: goto +44 -> 137
    //   96: astore 4
    //   98: aload_2
    //   99: ifnull +17 -> 116
    //   102: aload_2
    //   103: invokevirtual 96	java/io/FileReader:close	()V
    //   106: goto +10 -> 116
    //   109: astore 5
    //   111: aload 5
    //   113: invokevirtual 99	java/io/IOException:printStackTrace	()V
    //   116: aload 4
    //   118: athrow
    //   119: aload_2
    //   120: ifnull +17 -> 137
    //   123: aload_2
    //   124: invokevirtual 96	java/io/FileReader:close	()V
    //   127: goto +10 -> 137
    //   130: astore 5
    //   132: aload 5
    //   134: invokevirtual 99	java/io/IOException:printStackTrace	()V
    //   137: return
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	138	0	this	AbstractTableModel
    //   0	138	1	paramString	String
    //   16	108	2	localFileReader	java.io.FileReader
    //   44	2	3	localFileNotFoundException	java.io.FileNotFoundException
    //   70	2	3	localException	Exception
    //   96	21	4	localObject	Object
    //   60	3	5	localIOException1	java.io.IOException
    //   86	3	5	localIOException2	java.io.IOException
    //   109	3	5	localIOException3	java.io.IOException
    //   130	3	5	localIOException4	java.io.IOException
    // Exception table:
    //   from	to	target	type
    //   17	41	44	java/io/FileNotFoundException
    //   49	57	60	java/io/IOException
    //   17	41	70	java/lang/Exception
    //   75	83	86	java/io/IOException
    //   17	49	96	finally
    //   70	75	96	finally
    //   98	106	109	java/io/IOException
    //   119	127	130	java/io/IOException
  }
  
  private void load(XMLMemento paramXMLMemento)
  {
    IMemento[] arrayOfIMemento = paramXMLMemento.getChildren(getSourceName());
    AbstractTableVO localAbstractTableVO = null;
    String[] arrayOfString = source.getColumnNames();
    for (int i = 0; i < arrayOfIMemento.length; i++)
    {
      localAbstractTableVO = source.clone();
      for (int j = 0; j < arrayOfString.length; j++) {
        localAbstractTableVO.setColumnValue(j, arrayOfIMemento[i].getString(arrayOfString[j]));
      }
      add(localAbstractTableVO);
    }
  }
  
  /* Error */
  public void save(String paramString)
  {
    // Byte code:
    //   0: aload_0
    //   1: getfield 29	org/tizen/injector/model/AbstractTableModel:inventory	Ljava/util/Collection;
    //   4: ifnull +10 -> 14
    //   7: aload_0
    //   8: getfield 33	org/tizen/injector/model/AbstractTableModel:source	Lorg/tizen/injector/model/AbstractTableVO;
    //   11: ifnonnull +4 -> 15
    //   14: return
    //   15: ldc 10
    //   17: invokestatic 142	org/eclipse/ui/XMLMemento:createWriteRoot	(Ljava/lang/String;)Lorg/eclipse/ui/XMLMemento;
    //   20: astore_2
    //   21: aload_0
    //   22: aload_2
    //   23: invokespecial 146	org/tizen/injector/model/AbstractTableModel:save	(Lorg/eclipse/ui/XMLMemento;)V
    //   26: aconst_null
    //   27: astore_3
    //   28: new 148	java/io/FileWriter
    //   31: dup
    //   32: aload_1
    //   33: invokespecial 150	java/io/FileWriter:<init>	(Ljava/lang/String;)V
    //   36: astore_3
    //   37: aload_2
    //   38: aload_3
    //   39: invokevirtual 151	org/eclipse/ui/XMLMemento:save	(Ljava/io/Writer;)V
    //   42: goto +54 -> 96
    //   45: astore 4
    //   47: aload 4
    //   49: invokevirtual 99	java/io/IOException:printStackTrace	()V
    //   52: aload_3
    //   53: ifnull +61 -> 114
    //   56: aload_3
    //   57: invokevirtual 154	java/io/FileWriter:close	()V
    //   60: goto +54 -> 114
    //   63: astore 6
    //   65: aload 6
    //   67: invokevirtual 99	java/io/IOException:printStackTrace	()V
    //   70: goto +44 -> 114
    //   73: astore 5
    //   75: aload_3
    //   76: ifnull +17 -> 93
    //   79: aload_3
    //   80: invokevirtual 154	java/io/FileWriter:close	()V
    //   83: goto +10 -> 93
    //   86: astore 6
    //   88: aload 6
    //   90: invokevirtual 99	java/io/IOException:printStackTrace	()V
    //   93: aload 5
    //   95: athrow
    //   96: aload_3
    //   97: ifnull +17 -> 114
    //   100: aload_3
    //   101: invokevirtual 154	java/io/FileWriter:close	()V
    //   104: goto +10 -> 114
    //   107: astore 6
    //   109: aload 6
    //   111: invokevirtual 99	java/io/IOException:printStackTrace	()V
    //   114: return
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	115	0	this	AbstractTableModel
    //   0	115	1	paramString	String
    //   20	18	2	localXMLMemento	XMLMemento
    //   27	74	3	localFileWriter	java.io.FileWriter
    //   45	3	4	localIOException1	java.io.IOException
    //   73	21	5	localObject	Object
    //   63	3	6	localIOException2	java.io.IOException
    //   86	3	6	localIOException3	java.io.IOException
    //   107	3	6	localIOException4	java.io.IOException
    // Exception table:
    //   from	to	target	type
    //   28	42	45	java/io/IOException
    //   52	60	63	java/io/IOException
    //   28	52	73	finally
    //   75	83	86	java/io/IOException
    //   96	104	107	java/io/IOException
  }
  
  private void save(XMLMemento paramXMLMemento)
  {
    Iterator localIterator = inventory.iterator();
    AbstractTableVO localAbstractTableVO = null;
    String[] arrayOfString = (String[])null;
    while (localIterator.hasNext())
    {
      localAbstractTableVO = (AbstractTableVO)localIterator.next();
      arrayOfString = localAbstractTableVO.getColumnNames();
      IMemento localIMemento = paramXMLMemento.createChild(getSourceName());
      for (int i = 0; i < arrayOfString.length; i++) {
        localIMemento.putString(arrayOfString[i], String.valueOf(localAbstractTableVO.getColumnValue(i)));
      }
    }
  }
  
  public String getSourceName()
  {
    return source.getClass().getSimpleName();
  }
  
  public boolean isDirty()
  {
    return isDirty;
  }
  
  public synchronized void setDirty(boolean paramBoolean)
  {
    isDirty = paramBoolean;
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.model.AbstractTableModel
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.model;

public abstract class AbstractTableVO
  implements ITableVO
{
  public abstract String[] getColumnNames();
  
  public abstract Object getColumnValue(int paramInt);
  
  public abstract void setColumnValue(int paramInt, Object paramObject);
  
  public AbstractTableVO clone()
  {
    Object localObject = null;
    try
    {
      localObject = super.clone();
    }
    catch (CloneNotSupportedException localCloneNotSupportedException) {}
    return (AbstractTableVO)localObject;
  }
  
  public Object getColumnValue(String paramString)
  {
    return getColumnValue(getColumnIndex(paramString));
  }
  
  public String getColumnName(int paramInt)
  {
    String[] arrayOfString = getColumnNames();
    if ((paramInt < 0) || (paramInt > arrayOfString.length)) {
      return null;
    }
    return arrayOfString[paramInt];
  }
  
  public int getColumnIndex(String paramString)
  {
    String[] arrayOfString = getColumnNames();
    int i = -1;
    for (int j = 0; j < arrayOfString.length; j++) {
      if (paramString.equals(arrayOfString[j]))
      {
        i = j;
        break;
      }
    }
    return i;
  }
  
  public String toString()
  {
    StringBuffer localStringBuffer = new StringBuffer();
    String[] arrayOfString = getColumnNames();
    for (int i = 0; i < arrayOfString.length; i++)
    {
      Object localObject = getColumnValue(i);
      localStringBuffer.append(localObject == null ? "" : String.valueOf(localObject));
      if (i < arrayOfString.length - 1) {
        localStringBuffer.append(",");
      }
    }
    return localStringBuffer.toString();
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.model.AbstractTableVO
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.model;

public class DefaultTableModel
  extends AbstractTableModel
{
  public DefaultTableModel(AbstractTableVO paramAbstractTableVO)
  {
    super(paramAbstractTableVO);
  }
  
  public String getSourceName()
  {
    String str = source.getClass().getSimpleName();
    if (str.endsWith("VO")) {
      str = str.substring(0, str.length() - 2);
    }
    return str;
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.model.DefaultTableModel
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.model;

import java.util.Collection;

public abstract interface ITableModel
{
  public abstract void add(AbstractTableVO paramAbstractTableVO);
  
  public abstract void add(Collection<AbstractTableVO> paramCollection);
  
  public abstract void remove(AbstractTableVO paramAbstractTableVO);
  
  public abstract void remove(Collection<AbstractTableVO> paramCollection);
  
  public abstract ITableVO[] getDatas();
  
  public abstract void load(String paramString);
  
  public abstract void save(String paramString);
  
  public abstract void clear();
  
  public abstract int size();
  
  public abstract String getSourceName();
  
  public abstract boolean isDirty();
  
  public abstract void setDirty(boolean paramBoolean);
}

/* Location:
 * Qualified Name:     org.tizen.injector.model.ITableModel
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.model;

public abstract interface ITableVO
  extends IVO
{
  public abstract String[] getColumnNames();
  
  public abstract Object getColumnValue(int paramInt);
  
  public abstract Object getColumnValue(String paramString);
  
  public abstract int getColumnIndex(String paramString);
  
  public abstract String getColumnName(int paramInt);
  
  public abstract void setColumnValue(int paramInt, Object paramObject);
}

/* Location:
 * Qualified Name:     org.tizen.injector.model.ITableVO
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.model;

public abstract interface IVO
  extends Cloneable
{}

/* Location:
 * Qualified Name:     org.tizen.injector.model.IVO
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.protocol;

import java.nio.BufferUnderflowException;
import java.nio.ByteBuffer;
import org.tizen.injector.util.ByteUtil;
import org.tizen.injector.util.StringUtil;

public abstract class AbstractGA
{
  private static final int SINGLE_ROW_INDEX = 0;
  private int groupId;
  private int actionId;
  private int length = 0;
  private StructureGA header;
  private StructureGA body;
  
  public AbstractGA(int paramInt1, int paramInt2)
  {
    groupId = paramInt1;
    actionId = paramInt2;
  }
  
  protected abstract void makeBody();
  
  protected abstract void makeHeader();
  
  public void intialize()
  {
    header = new StructureGA();
    makeHeader();
    body = new StructureGA();
    makeBody();
  }
  
  public void intialize(byte[] paramArrayOfByte)
  {
    ByteBuffer localByteBuffer = ByteUtil.getByteBuffer(paramArrayOfByte);
    AbstractItem localAbstractItem = null;
    length = paramArrayOfByte.length;
    header = new StructureGA();
    makeHeader();
    for (int i = 0; i < header.getItemCount(); i++)
    {
      localAbstractItem = header.getItem(i);
      putBufferToItem(localAbstractItem, 0, localByteBuffer);
    }
    body = new StructureGA();
    makeBody();
    i = getLoopCount();
    body.setLoopCount(i);
    for (int j = 0; j < i; j++) {
      for (int k = 0; k < body.getItemCount(); k++)
      {
        localAbstractItem = body.getItem(k);
        putBufferToItem(localAbstractItem, j, localByteBuffer);
      }
    }
  }
  
  private int getLoopCount()
  {
    return (int)Math.ceil((length - header.getByteLength()) / body.getByteLength());
  }
  
  public byte[] makeStarterPacket()
  {
    int i = getSendLength();
    ByteBuffer localByteBuffer = ByteUtil.getByteBuffer(4);
    localByteBuffer.putShort((short)i);
    localByteBuffer.put(Integer.valueOf(groupId).byteValue());
    localByteBuffer.put(Integer.valueOf(actionId).byteValue());
    return localByteBuffer.array();
  }
  
  public byte[] makePacket()
  {
    int i = getSendLength();
    ByteBuffer localByteBuffer = ByteUtil.getByteBuffer(i);
    AbstractItem localAbstractItem = null;
    for (int j = 0; j < header.getItemCount(); j++)
    {
      localAbstractItem = header.getItem(j);
      putItemToBuffer(localAbstractItem, 0, localByteBuffer);
    }
    for (j = 0; j < body.getLoopCount(); j++) {
      for (int k = 0; k < body.getItemCount(); k++)
      {
        localAbstractItem = body.getItem(k);
        putItemToBuffer(localAbstractItem, j, localByteBuffer);
      }
    }
    return localByteBuffer.array();
  }
  
  private void putItemToBuffer(AbstractItem paramAbstractItem, int paramInt, ByteBuffer paramByteBuffer)
  {
    ItemType localItemType = paramAbstractItem.getType();
    if (localItemType == ItemType.BYTE)
    {
      paramByteBuffer.put(getIntValue(paramAbstractItem, paramInt).byteValue());
    }
    else if (localItemType == ItemType.SHORT)
    {
      paramByteBuffer.putShort(getIntValue(paramAbstractItem, paramInt).shortValue());
    }
    else if (localItemType == ItemType.INT)
    {
      paramByteBuffer.putInt(getIntValue(paramAbstractItem, paramInt).intValue());
    }
    else if (localItemType == ItemType.ByteArray)
    {
      byte[] arrayOfByte = ((ByteArrayItem)paramAbstractItem).getValue(paramInt);
      int i = paramAbstractItem.getByteLength();
      int j = paramByteBuffer.position();
      if (arrayOfByte.length > i) {
        paramByteBuffer.put(arrayOfByte, 0, i);
      } else {
        paramByteBuffer.put(arrayOfByte);
      }
      paramByteBuffer.position(j + i);
    }
  }
  
  private Integer getIntValue(AbstractItem paramAbstractItem, int paramInt)
  {
    return Integer.valueOf(((IntItem)paramAbstractItem).getValue(paramInt));
  }
  
  private void putBufferToItem(AbstractItem paramAbstractItem, int paramInt, ByteBuffer paramByteBuffer)
  {
    ItemType localItemType = paramAbstractItem.getType();
    try
    {
      if (localItemType == ItemType.BYTE)
      {
        ((IntItem)paramAbstractItem).setValue(paramInt, paramByteBuffer.get() & 0xFF);
      }
      else if (localItemType == ItemType.SHORT)
      {
        ((IntItem)paramAbstractItem).setValue(paramInt, paramByteBuffer.getShort());
      }
      else if (localItemType == ItemType.INT)
      {
        ((IntItem)paramAbstractItem).setValue(paramInt, paramByteBuffer.getInt());
      }
      else if (localItemType == ItemType.ByteArray)
      {
        int i = paramAbstractItem.getByteLength();
        int j = paramByteBuffer.remaining();
        byte[] arrayOfByte = (byte[])null;
        if (i > j) {
          arrayOfByte = new byte[j];
        } else if (paramAbstractItem.getName() == "CALL_NUMBER") {
          arrayOfByte = new byte[j];
        } else {
          arrayOfByte = new byte[i];
        }
        paramByteBuffer.get(arrayOfByte, 0, arrayOfByte.length);
        ((ByteArrayItem)paramAbstractItem).setValue(paramInt, arrayOfByte);
      }
    }
    catch (BufferUnderflowException localBufferUnderflowException)
    {
      localBufferUnderflowException.printStackTrace();
    }
    catch (Exception localException)
    {
      localException.printStackTrace();
    }
  }
  
  public String getKey()
  {
    return StringUtil.makeKey(groupId, actionId);
  }
  
  public int getSendLength()
  {
    return header.getByteLength() + body.getByteLength() * body.getLoopCount();
  }
  
  public int getReceiveLength()
  {
    return length;
  }
  
  public StructureGA getBody()
  {
    return body;
  }
  
  public StructureGA getHeader()
  {
    return header;
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.protocol.AbstractGA
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.protocol;

public class AbstractItem
{
  private ItemType type;
  private int length;
  private String name;
  
  public AbstractItem(ItemType paramItemType, String paramString, int paramInt)
  {
    type = paramItemType;
    name = paramString;
    length = paramInt;
  }
  
  public ItemType getType()
  {
    return type;
  }
  
  public int getByteLength()
  {
    return length;
  }
  
  public String getName()
  {
    return name;
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.protocol.AbstractItem
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.protocol;

import java.util.ArrayList;

public class ByteArrayItem
  extends AbstractItem
{
  private ArrayList<byte[]> value = new ArrayList();
  
  public ByteArrayItem(ItemType paramItemType, String paramString, int paramInt)
  {
    super(paramItemType, paramString, paramInt);
  }
  
  public void setValue(int paramInt, byte[] paramArrayOfByte)
  {
    value.add(paramArrayOfByte);
  }
  
  public byte[] getValue(int paramInt)
  {
    return (byte[])value.get(paramInt);
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.protocol.ByteArrayItem
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.protocol;

import java.util.ArrayList;

public class IntItem
  extends AbstractItem
{
  private ArrayList<Integer> value = new ArrayList();
  
  public IntItem(ItemType paramItemType, Stri
1 2 3 4

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