Mercurial > hg > truffle
comparison graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/Node.java @ 13994:989f58d6a0ca
Truffle: Added API for Node.getKind().
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Fri, 21 Feb 2014 02:24:03 +0100 |
parents | f46cab39a9a2 |
children | c5411233cdf8 |
comparison
equal
deleted
inserted
replaced
13990:fcc40370f78d | 13994:989f58d6a0ca |
---|---|
80 } | 80 } |
81 } | 81 } |
82 this.sourceSection = section; | 82 this.sourceSection = section; |
83 } | 83 } |
84 | 84 |
85 public Kind getKind() { | |
86 NodeInfo info = getClass().getAnnotation(NodeInfo.class); | |
87 if (info != null) { | |
88 return info.kind(); | |
89 } | |
90 return Kind.SPECIALIZED; | |
91 } | |
92 | |
85 /** | 93 /** |
86 * Clears any previously assigned guest language source code from this node. | 94 * Clears any previously assigned guest language source code from this node. |
87 */ | 95 */ |
88 public final void clearSourceSection() { | 96 public final void clearSourceSection() { |
89 this.sourceSection = null; | 97 this.sourceSection = null; |