|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.officefloor.eclipse.util.EclipseUtil
public class EclipseUtil
Utility methods for working in Eclipse.
| Method Summary | ||
|---|---|---|
static
|
addToList(List<L> list,
I item)
Convenience method to add an item to a list. |
|
static org.eclipse.core.runtime.CoreException |
createCoreException(Throwable failure)
Creates a CoreException from the input Throwable. |
|
static
|
createInstance(Class<T> clazz,
AbstractOfficeFloorEditor<?,?> editor)
Creates an instance of the class. |
|
static
|
createInstance(String className,
Class<S> superType,
AbstractOfficeFloorEditor<?,?> editor)
Convenience method to create an instance of a class by its name. |
|
static boolean |
isBlank(String value)
Utility method to indicate if the input String is
null or empty. |
|
static
|
obtainClass(String className,
Class<S> superType,
AbstractOfficeFloorEditor<?,?> editor)
Obtains the Class by its name. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static boolean isBlank(String value)
String is
null or empty.
value - Value to check if blank.
null or empty.
public static <S> Class<S> obtainClass(String className,
Class<S> superType,
AbstractOfficeFloorEditor<?,?> editor)
Class by its name.
className - Fully qualified name of the class.superType - Type that the class must be a sub type.editor - AbstractOfficeFloorEditor to report issues.
Class or null if could not obtain.
public static <T> T createInstance(Class<T> clazz,
AbstractOfficeFloorEditor<?,?> editor)
clazz - Class to create an instance from.editor - AbstractOfficeFloorEditor to report issues.
null if unable to
instantiate.
public static <S> S createInstance(String className,
Class<S> superType,
AbstractOfficeFloorEditor<?,?> editor)
className - Fully qualified name of class.superType - Type that the class of instance must be a sub type.editor - AbstractOfficeFloorEditor to report issues.
null if unable to instantiate.public static org.eclipse.core.runtime.CoreException createCoreException(Throwable failure)
CoreException from the input Throwable.
failure - Throwable.
CoreException.
public static <L,I extends L> void addToList(List<L> list,
I item)
null.
list - List.item - Item to be added to the list. Will not be added if
null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||