A set of adaptors for types belonging to the Java language or Java SDK. Includes:
createJavaIntArray()
, createJavaFloatArray()
,
createJavaByteArray()
, createJavaBooleanArray()
,
createJavaObjectArray()
, and
createJavaStringArray()
,Array
class and Java array types, for example,
javaIntArray()
, javaFloatArray()
, javaByteArray()
,
javaBooleanArray()
, javaObjectArray()
, and
javaStringArray()
,CeylonList
, CeylonSet
,
CeylonMap
,JavaList
, JavaSet
,
JavaMap
, andCeylonIterable
and JavaIterable
which adapt
between Java's Iterable
interface and
Ceylon's Iterable
interface,CeylonStringIterable
, CeylonIntegerIterable
,
CeylonFloatIterable
, CeylonByteIterable
, and
CeylonBooleanIterable
, which adapt Java
Iterable
s of primitive types,CeylonStringList
, CeylonStringMap
,
JavaStringList
, and JavaStringMap
, which adapt
maps and lists containing strings, andJavaRunnable
and JavaThread
which adapt Ceylon
functions to Java's Runnable
and
Thread
.In addition, the functions javaClass()
and
javaClassFromInstance()
allow Ceylon programs to obtain
an instance of Class
.
Packages | |
ceylon.interop.java |
Dependencies | ||
ceylon.collection | 1.3.3 | |
java.base | 7 |
Aliases | |
ByteArrayLike | Source Codeshared ByteArrayLike=> Array<Bits>|ByteArray An array whose elements can be represented as an
|
FloatArrayLike | Source Codeshared FloatArrayLike=> Array<Single>|Array<Double>|FloatArray|DoubleArray An array whose elements can be represented as an
|
IntegerArrayLike | Source Codeshared IntegerArrayLike=> Array<Short>|Array<Int>|Array<Long>|ShortArray|IntArray|LongArray An array whose elements can be represented as an
|
JavaStringArrayLike | Source Codeshared JavaStringArrayLike=> ObjectArray<String>|Array<String>|Array<String?> An array whose elements can be represented as an
|
StringArrayLike | Source Codeshared StringArrayLike=> ObjectArray<JavaString>|Array<JavaString?>|Array<JavaString> An array whose elements can be represented as an
|
Functions | |
createJavaBooleanArray | Source Codeshared BooleanArray createJavaBooleanArray({Boolean*} booleans) Create a new |
createJavaByteArray | Source Codeshared ByteArray createJavaByteArray({Byte*} elements) Create a new |
createJavaDoubleArray | Source Codeshared DoubleArray createJavaDoubleArray({Float*} elements) Create a new |
createJavaFloatArray | Source Codeshared FloatArray createJavaFloatArray({Float*} elements) Create a new |
createJavaIntArray | Source Codeshared IntArray createJavaIntArray({Integer*} elements) Create a new |
createJavaLongArray | Source Codeshared LongArray createJavaLongArray({Integer*} elements) Create a new |
createJavaObjectArray | Source Codeshared ObjectArray<Element> createJavaObjectArray<Element>({Element?*} elements) Create a new Throws
|
createJavaShortArray | Source Codeshared ShortArray createJavaShortArray({Integer*} elements) Create a new |
createJavaStringArray | Source Codeshared ObjectArray<JavaString> createJavaStringArray({String*} elements) Create a new string array, that is, a Java
|
javaAnnotationClass | Source Codeshared Class<out Type> javaAnnotationClass<Type>() Deprecated: use A Java |
javaBooleanArray | Source Codeshared BooleanArray javaBooleanArray(Array<Boolean>|Array<Bool> array) |
javaByteArray | Source Codeshared ByteArray javaByteArray(Array<Byte>|Array<Bits> array) |
javaCharArray | Source Codeshared CharArray javaCharArray(Array<Char> array) |
javaClass | Source Codeshared Class<Type> javaClass<Type>() Deprecated: use A Java |
javaClassFromDeclaration | Source Codeshared Class<out Object> javaClassFromDeclaration(ClassOrInterfaceDeclaration declaration) Deprecated: use A Java |
javaClassFromInstance | Source Codeshared Class<out Type> javaClassFromInstance<Type>(Type instance) Deprecated: use A Java |
javaClassFromModel | Source Codeshared Class<out Type> javaClassFromModel<Type>(ClassOrInterface<Type> model) Deprecated: use A Java |
javaDoubleArray | Source Codeshared DoubleArray javaDoubleArray(Array<Float>|Array<Double> array) |
javaFloatArray | Source Codeshared FloatArray javaFloatArray(Array<Single> array) |
javaIntArray | Source Codeshared IntArray javaIntArray(Array<Character>|Array<Int> array) |
javaLongArray | Source Codeshared LongArray javaLongArray(Array<Integer>|Array<Long> array) |
javaObjectArray | Source Codeshared ObjectArray<Element> javaObjectArray<Element>(Array<Element?> array) The Throws
|
javaShortArray | Source Codeshared ShortArray javaShortArray(Array<Short> array) |
javaStackTrace | Source Codeshared StackTraceElement[] javaStackTrace(Throwable throwable) Deprecated: use The stack trace information for the given |
javaString | Source Codeshared JavaString javaString(String string) Deprecated: use The |
javaStringArray | Source Codeshared ObjectArray<JavaString> javaStringArray(Array<String> array) |
synchronize | Source Codeshared Return synchronize<Return>(Object on, Return do()) |
toByteArray | Source Codeshared Array<Byte> toByteArray(ByteArrayLike array) Create a new |
toFloatArray | Source Codeshared Array<Float> toFloatArray(FloatArrayLike array) Create a new |
toIntegerArray | Source Codeshared Array<Integer> toIntegerArray(IntegerArrayLike array) Create a new |
toJavaStringArray | Source Codeshared ObjectArray<JavaString> toJavaStringArray(JavaStringArrayLike array) Create a new Java string array, that is,
a Java See also toStringArray() |
toStringArray | Source Codeshared Array<String?> toStringArray(StringArrayLike array) Create a new Ceylon string array, that is, an
See also toJavaStringArray() |
Classes | |
CeylonBooleanIterable | Source Codeshared CeylonBooleanIterable A Ceylon |
CeylonByteIterable | Source Codeshared CeylonByteIterable A Ceylon |
CeylonCollection | Source Codeshared CeylonCollection<out Element> A Ceylon |
CeylonDestroyable | Source Codeshared CeylonDestroyable<Resource> A Ceylon try (inputStream = CeylonDestroyable(FileInputStream(file)) { Integer byte = inputStream.resource.read(); ... } Note: Since Ceylon 1.2.1 it is possible to use
try (inputStream = FileInputStream(file)) { ... } |
CeylonFloatIterable | Source Codeshared CeylonFloatIterable A Ceylon |
CeylonIntegerIterable | Source Codeshared CeylonIntegerIterable A Ceylon |
CeylonIterable | Source Codeshared CeylonIterable<Element> A Ceylon IntArray ints = ... ; for (int in CeylonIterable(Arrays.asList(*ints.array))) { ... } If the given CeylonIterable<String?>(javaStringStream) If a non-optional Note: Since Ceylon 1.2.1 it is possible to use
JavaIterable<Foo> iterable = ... ; for (foo in iterable) { ... } |
CeylonIterator | Source Codeshared CeylonIterator<T> A Ceylon |
CeylonList | Source Codeshared CeylonList<out Element> A Ceylon If the given CeylonList<String?>(javaStringList) If a non-optional |
CeylonMap | Source Codeshared CeylonMap<out Key,out Item> A Ceylon If the given CeylonMap<String,Object?>(javaStringObjectMap) If a non-optional |
CeylonMutableList | Source Codeshared CeylonMutableList<Element> A Ceylon If the given CeylonMutableList<String?>(javaStringList) If a non-optional |
CeylonMutableMap | Source Codeshared CeylonMutableMap<Key,Item> A Ceylon If the given CeylonMap<String,Object?>(javaStringObjectMap) If a non-optional |
CeylonMutableSet | Source Codeshared CeylonMutableSet<Element> A Ceylon |
CeylonSet | Source Codeshared CeylonSet<out Element> A Ceylon |
CeylonStringIterable | Source Codeshared CeylonStringIterable A Ceylon |
CeylonStringList | Source Codeshared CeylonStringList A This class can be used to wrap a CeylonStringList(CeylonList(javaList)) If the given list is a |
CeylonStringMap | Source Codeshared CeylonStringMap<out Item> A This class can be used to wrap a CeylonStringMap(CeylonMap(javaMap)) If the given map is a |
CeylonStringMutableList | Source Codeshared CeylonStringMutableList A This class can be used to wrap a CeylonStringMutableList(CeylonMutableList(javaList)) If the given list is not a |
CeylonStringMutableMap | Source Codeshared CeylonStringMutableMap<Item> A This class can be used to wrap a CeylonStringMutableMap(CeylonMutableMap(javaMap)) If the given list is not a |
JavaCloseable | Source Codeshared JavaCloseable<Resource> A Java |
JavaCollection | Source Codeshared JavaCollection<E> A Java |
JavaComparator | Source Codeshared JavaComparator<Element> A Java |
JavaIterable | Source Codeshared JavaIterable<Element> A Java |
JavaIterator | Source Codeshared JavaIterator<T> A Java |
JavaList | Source Codeshared JavaList<E> A Java |
JavaMap | Source Codeshared JavaMap<K,V> A Java |
JavaRunnable | Source Codeshared JavaRunnable A Java |
JavaSet | Source Codeshared JavaSet<E> A Java |
JavaStringList | Source Codeshared JavaStringList A JavaList(JavaStringList(ceylonList)) |
JavaStringMap | Source Codeshared JavaStringMap<Item> A JavaMap(JavaStringMap(ceylonMap)) |
JavaThread | Source Codeshared JavaThread A Java |