public class Utils
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Utils.SplitResult
The result of splitting a contents object.
|
| Modifier | Constructor and Description |
|---|---|
private |
Utils()
Prevents this class from being instantiated from outside.
|
| Modifier and Type | Method and Description |
|---|---|
private static <T> java.util.List<T> |
assign(java.util.List<T> list,
java.lang.Object element,
java.lang.Class<T> type)
Helper function to assign the
element to
list if element is of type
type and to create list if not
defined before. |
static java.lang.String |
getQualifiedNameString(QualifiedName name)
Returns a string representing a qualified name.
|
static java.lang.String |
getQualifiedNameString(QualifiedName name,
AccessName aName)
Returns a string representing a qualified name.
|
static boolean |
isImportResolutionEnabled()
Returns whether the import resolution shall be enabled.
|
static <T> java.util.List<T> |
select(java.util.List<org.eclipse.emf.ecore.EObject> list,
java.lang.Class<T> type)
Selects those elements out of
list which are an instance
of type. |
static Utils.SplitResult |
split(java.util.List<org.eclipse.emf.ecore.EObject> elements)
Splits the now heterogeneous list of elements in
elements
into individual lists stored in the result instance. |
static void |
split(java.util.List<org.eclipse.emf.ecore.EObject> elements,
Utils.SplitResult result)
Splits the now heterogeneous list of elements in
elements
into individual lists stored in result instance. |
static java.lang.String |
toString(VariableDeclaration varDecl)
Turns the declared variable names of the
varDecl into a string. |
public static java.lang.String getQualifiedNameString(QualifiedName name)
name - the qualified namepublic static java.lang.String getQualifiedNameString(QualifiedName name,
AccessName aName)
name - the qualified nameaName - optional access to a compound (may be null)public static <T> java.util.List<T> select(java.util.List<org.eclipse.emf.ecore.EObject> list,
java.lang.Class<T> type)
list which are an instance
of type.T - the type of elements to be selectedlist - the list to select fromtype - the type to select upontypeprivate static <T> java.util.List<T> assign(java.util.List<T> list,
java.lang.Object element,
java.lang.Class<T> type)
element to
list if element is of type
type and to create list if not
defined before.T - the type of elements to be processedlist - the list to insert element intoelement - the element to be insertedtype - the type to check forlist or a new list including element
if type matchespublic static Utils.SplitResult split(java.util.List<org.eclipse.emf.ecore.EObject> elements)
elements
into individual lists stored in the result instance.elements - the elements to splitpublic static void split(java.util.List<org.eclipse.emf.ecore.EObject> elements,
Utils.SplitResult result)
elements
into individual lists stored in result instance.elements - the elements to splitresult - the result instance to be modified as a side effectpublic static final boolean isImportResolutionEnabled()
true if import resolution is enabled, false elsepublic static java.lang.String toString(VariableDeclaration varDecl)
varDecl into a string. [debugging]varDecl - the variable declarationCopyright © 2009 - 2018 SSE. All Rights Reserved.