org.eclipse.datatools.sqltools.sqlbuilder.util
Class RSCCoreUIUtil

java.lang.Object
  extended by org.eclipse.datatools.sqltools.sqlbuilder.util.RSCCoreUIUtil

public class RSCCoreUIUtil
extends java.lang.Object


Constructor Summary
RSCCoreUIUtil()
           
 
Method Summary
static boolean chkCrossReferences(org.eclipse.emf.common.util.EList refs, org.eclipse.emf.ecore.EObject base)
          Check cross references
static boolean chkIfEObjectsMatched(org.eclipse.emf.ecore.EObject working, org.eclipse.emf.ecore.EObject base, boolean chkCrossReferences)
          Check if two EObjects are "equal".
static java.lang.Class dynamicClass(java.lang.String classname)
          Gets the Class object for a given class name.
static java.lang.Object dynamicInstance(java.lang.Class cclass, java.lang.Class[] classes, java.lang.Object[] args)
          Gets an instance of a class using its constructor.
static java.lang.Object dynamicInstance(java.lang.String classname, java.lang.Class[] classes, java.lang.Object[] args)
          Gets an instance of a class using its constructor.
static java.lang.Object dynamicInvoke(java.lang.Object instance, java.lang.String methodname, java.lang.Class[] classes, java.lang.Object[] args)
          Invokes a dynamic method in a given instance.
static int launchASyncDialog(org.eclipse.jface.dialogs.MessageDialog dialog)
           
static int launchSyncDialog(org.eclipse.jface.dialogs.MessageDialog dialog)
           
static java.util.ArrayList sortList(java.util.ArrayList list)
          Sorts a given ArrayList.
static java.util.Vector sortVector(java.util.Vector vIn)
          Sorts a given vector.
static java.lang.Object staticField(java.lang.Class cclass, java.lang.String fieldname)
          Gets the value of a static field.
static java.lang.Object staticField(java.lang.String classname, java.lang.String fieldname)
          Gets the value of a static field.
static java.lang.Object staticInvoke(java.lang.Class cclass, java.lang.String methodname, java.lang.Class[] classes, java.lang.Object[] args)
          Invokes a static method in a given class.
static java.lang.Object staticInvoke(java.lang.String classname, java.lang.String methodname, java.lang.Class[] classes, java.lang.Object[] args)
          Invokes a static method in a given class.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RSCCoreUIUtil

public RSCCoreUIUtil()
Method Detail

launchSyncDialog

public static int launchSyncDialog(org.eclipse.jface.dialogs.MessageDialog dialog)

launchASyncDialog

public static int launchASyncDialog(org.eclipse.jface.dialogs.MessageDialog dialog)

sortList

public static java.util.ArrayList sortList(java.util.ArrayList list)
Sorts a given ArrayList.


sortVector

public static java.util.Vector sortVector(java.util.Vector vIn)
Sorts a given vector.


dynamicInstance

public static java.lang.Object dynamicInstance(java.lang.Class cclass,
                                               java.lang.Class[] classes,
                                               java.lang.Object[] args)
Gets an instance of a class using its constructor.

Parameters:
cclass - The class we want to construct.
classes - Array of Class describing the argument types, or null.
args - Array of arguments to the constructor, or null.
Returns:
The instance of class classname.

dynamicInstance

public static java.lang.Object dynamicInstance(java.lang.String classname,
                                               java.lang.Class[] classes,
                                               java.lang.Object[] args)
Gets an instance of a class using its constructor.

Parameters:
classname - The class we want to construct.
classes - Array of Class describing the argument types, or null.
args - Array of arguments to the constructor, or null.
Returns:
The instance of class classname.

dynamicInvoke

public static java.lang.Object dynamicInvoke(java.lang.Object instance,
                                             java.lang.String methodname,
                                             java.lang.Class[] classes,
                                             java.lang.Object[] args)
Invokes a dynamic method in a given instance.

Parameters:
instance - The instance.
methodname - The method to call.
classes - Array of Class describing the argument types, or null.
args - Array of arguments to the constructor, or null.
Returns:
Null if the invocation fails; Boolean.TRUE or the return from the invocation if it succeeds.

staticInvoke

public static java.lang.Object staticInvoke(java.lang.String classname,
                                            java.lang.String methodname,
                                            java.lang.Class[] classes,
                                            java.lang.Object[] args)
Invokes a static method in a given class.

Parameters:
classname - The class with the static method.
methodname - The method to call.
classes - Array of Class describing the argument types, or null.
args - Array of arguments to the constructor, or null.
Returns:
Null if the invocation fails; Boolean.TRUE or the return from the invocation if it succeeds.

staticInvoke

public static java.lang.Object staticInvoke(java.lang.Class cclass,
                                            java.lang.String methodname,
                                            java.lang.Class[] classes,
                                            java.lang.Object[] args)
Invokes a static method in a given class.

Parameters:
cclass - The class with the static method.
methodname - The method to call.
classes - Array of Class describing the argument types, or null.
args - Array of arguments to the constructor, or null.
Returns:
Null if the invocation fails; Boolean.TRUE or the return from the invocation if it succeeds.

staticField

public static java.lang.Object staticField(java.lang.Class cclass,
                                           java.lang.String fieldname)
Gets the value of a static field.

Parameters:
cclass - The class with the static method.
fieldname - The name of the field whose value is wanted.
Returns:
Null if the invocation fails; the value of the field otherwise.

staticField

public static java.lang.Object staticField(java.lang.String classname,
                                           java.lang.String fieldname)
Gets the value of a static field.

Parameters:
classname - The class with the static method.
fieldname - The name of the field whose value is wanted.
Returns:
Null if the invocation fails; the value of the field otherwise.

dynamicClass

public static java.lang.Class dynamicClass(java.lang.String classname)
Gets the Class object for a given class name.

Parameters:
classname - The class name.
Returns:
Null if the invocation fails; the Class otherwise.

chkIfEObjectsMatched

public static boolean chkIfEObjectsMatched(org.eclipse.emf.ecore.EObject working,
                                           org.eclipse.emf.ecore.EObject base,
                                           boolean chkCrossReferences)
Check if two EObjects are "equal".

Parameters:
working - working object
base - base object
chkCrossReferences - check eCrossReferences
Returns:

chkCrossReferences

public static boolean chkCrossReferences(org.eclipse.emf.common.util.EList refs,
                                         org.eclipse.emf.ecore.EObject base)
Check cross references

Parameters:
refs - cross references
base - base object
Returns: