at:tutorial:symbiosis
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
at:tutorial:symbiosis [2008/10/22 18:32] – * tvcutsem | at:tutorial:symbiosis [2009/04/22 07:44] – * tvcutsem | ||
---|---|---|---|
Line 11: | Line 11: | ||
When AmbientTalk values and Java values cross language boundaries (e.g. when they are passed as arguments of or return values from a method that is invoked from the other language), these values are converted. AmbientTalk features a number of built-in conversions that maps AmbientTalk' | When AmbientTalk values and Java values cross language boundaries (e.g. when they are passed as arguments of or return values from a method that is invoked from the other language), these values are converted. AmbientTalk features a number of built-in conversions that maps AmbientTalk' | ||
- | ^ Java type and value ^ AmbientTalk value ^ | + | ^ Java value : type ^ AmbientTalk value ^ |
| null: Object | nil | | | null: Object | nil | | ||
| n: int | a number n | | | n: int | a number n | | ||
Line 33: | Line 33: | ||
| a class wrapper( c ) | c : Class | | | a class wrapper( c ) | c : Class | | ||
| a java wrapper(obj : Type) | obj : Type | | | a java wrapper(obj : Type) | obj : Type | | ||
- | | any object o | AT wrapper (o) : Interface | + | | any object o | AT wrapper (o) : I | |
Note that non-native Java or AmbientTalk objects are represented in the other language by means of " | Note that non-native Java or AmbientTalk objects are represented in the other language by means of " | ||
+ | |||
+ | In the last conversion rule of the second table, '' | ||
===== Accessing Java from within AmbientTalk ===== | ===== Accessing Java from within AmbientTalk ===== | ||
Line 49: | Line 51: | ||
A class is represented as a normal AmbientTalk object. All '' | A class is represented as a normal AmbientTalk object. All '' | ||
+ | |||
+ | < | ||
+ | If you want to load your own Java class make sure that the .class file is in the classpath of the JVM running AmbientTalk. By default, the iat script puts the at/ directory of the AmbientTalk distribution in the classpath. | ||
+ | </ | ||
==== Creating Java objects ==== | ==== Creating Java objects ==== | ||
Line 177: | Line 183: | ||
< | < | ||
- | EmbeddedAmbientTalk | + | EmbeddableAmbientTalk |
vm.initialize( | vm.initialize( | ||
NATParser.parse( | NATParser.parse( |
at/tutorial/symbiosis.txt · Last modified: 2013/05/17 20:25 by tvcutsem