|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.xtext.xbase.lib.Conversions
public class Conversions
This is a library used to convert arrays to lists and vice versa in a way that keeps the identity of the to-be-converted object. That is, changes in the array will be reflected by the list and changes to the list will be reflected by the array for both kinds of conversion. The utilities in this class should only be used by the Xbase compiler.
Nested Class Summary | |
---|---|
static class |
Conversions.WrappedArray<T>
A list that is completely backed by an array and that provides access to that array. |
static class |
Conversions.WrappedPrimitiveArray
A list that is completely backed by an array of primitives and that provides access to that array. |
Constructor Summary | |
---|---|
Conversions()
|
Method Summary | |
---|---|
static java.lang.Object |
doWrapArray(java.lang.Object object)
Wraps object in a list if and only if object is an array. |
static java.lang.Object |
unwrapArray(java.lang.Object value)
Unwraps object to extract the original array if and only if object was previously created by
doWrapArray(Object) . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Conversions()
Method Detail |
---|
public static java.lang.Object doWrapArray(java.lang.Object object)
object
in a list if and only if object
is an array. Works for primitive and
object-component types.
public static java.lang.Object unwrapArray(java.lang.Object value)
object
to extract the original array if and only if object
was previously created by
doWrapArray(Object)
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |