comparison graal/com.oracle.truffle.api.interop/src/com/oracle/truffle/api/interop/ForeignAccessFactory.java @ 18865:d6dba4c723c0

Interop: improve exception names and JavaDoc
author Matthias Grimmer <grimmer@ssw.jku.at>
date Wed, 14 Jan 2015 13:43:16 +0100
parents 5294b624e2f0
children
comparison
equal deleted inserted replaced
18864:552993e5795a 18865:d6dba4c723c0
25 package com.oracle.truffle.api.interop; 25 package com.oracle.truffle.api.interop;
26 26
27 import com.oracle.truffle.api.*; 27 import com.oracle.truffle.api.*;
28 import com.oracle.truffle.api.interop.messages.*; 28 import com.oracle.truffle.api.interop.messages.*;
29 29
30 /**
31 * Interface of a factory that produces AST snippets that can access a foreign {@code TruffleObject}
32 * . A Truffle language implementation accesses a {@code TruffleObject} via a {@code Message}. The
33 * {@code TruffleObject} instance provides a {@code ForeignAccessFactory} instance that provides an
34 * AST snippet for a given {@code Message}.
35 */
30 public interface ForeignAccessFactory { 36 public interface ForeignAccessFactory {
31 37
38 /**
39 * Provides a {@code InteropPredicate} that tests whether a {@code TruffleObject} can be
40 * accessed using AST snippets, produced by this {@code ForeignAccessFactory}.
41 *
42 * @return the {@code InteropPredicate} that tests if a {@code TruffleObject} can be accessed by
43 * AST snipptes, produces by this {@code ForeignAccessFactory}.
44 */
32 InteropPredicate getLanguageCheck(); 45 InteropPredicate getLanguageCheck();
33 46
47 /**
48 * Provides an AST snippet to access a {@code TruffleObject}.
49 *
50 * @param tree the {@code Message} that represents the access to a {@code TruffleObject}.
51 * @return the AST snippet for accessing the {@code TruffleObject}, wrapped as a
52 * {@code CallTarget}.
53 */
34 CallTarget getAccess(Message tree); 54 CallTarget getAccess(Message tree);
35 55
36 } 56 }