Mercurial > hg > truffle
comparison truffle/com.oracle.truffle.api.interop/src/com/oracle/truffle/api/interop/Message.java @ 22155:48004d27086d
Documenting the rules for subclasses
author | Jaroslav Tulach <jaroslav.tulach@oracle.com> |
---|---|
date | Tue, 15 Sep 2015 09:30:22 +0200 |
parents | cc195dd45121 |
children | dc83cc1f94f2 |
comparison
equal
deleted
inserted
replaced
22154:cc195dd45121 | 22155:48004d27086d |
---|---|
34 * like {@link #IS_NULL} or factory methods in this class, but one can always define their own, | 34 * like {@link #IS_NULL} or factory methods in this class, but one can always define their own, |
35 * specialized messages. | 35 * specialized messages. |
36 */ | 36 */ |
37 public abstract class Message { | 37 public abstract class Message { |
38 /** | 38 /** |
39 * One can define their own extended message by subclassing. The expectation is that the | |
40 * subclass will have public constructor and its {@link #equals(java.lang.Object)} and | |
41 * {@link #hashCode()} methods will operate on the class equivalence. Only then the subclass | |
42 * will work properly with {@link #valueOf(java.lang.String)} and | |
43 * {@link #toString(com.oracle.truffle.api.interop.Message)} methods. | |
44 */ | |
45 protected Message() { | |
46 } | |
47 | |
48 /** | |
39 * Message to read an object field. The | 49 * Message to read an object field. The |
40 * {@link Factory#access(com.oracle.truffle.api.interop.Message) target} created for this | 50 * {@link Factory#access(com.oracle.truffle.api.interop.Message) target} created for this |
41 * message accepts (in addition to a | 51 * message accepts (in addition to a |
42 * {@link ForeignAccess#getReceiver(com.oracle.truffle.api.frame.Frame) receiver}) a single | 52 * {@link ForeignAccess#getReceiver(com.oracle.truffle.api.frame.Frame) receiver}) a single |
43 * {@link ForeignAccess#getArguments(com.oracle.truffle.api.frame.Frame) argument} identifying a | 53 * {@link ForeignAccess#getArguments(com.oracle.truffle.api.frame.Frame) argument} identifying a |