|
2 | 2 |
|
3 | 3 | import java.lang.reflect.Type; |
4 | 4 |
|
| 5 | +/** |
| 6 | + * Container for metadata pertaining to an Op <b>instance</b>. This data is |
| 7 | + * wrapped up with the Op instance into a {@link RichOp} |
| 8 | + * |
| 9 | + * @author Gabriel Selzer |
| 10 | + * @see RichOp#metadata() |
| 11 | + */ |
5 | 12 | public class OpMetadata { |
6 | 13 |
|
| 14 | + /* The functional Type of the Op */ |
7 | 15 | private final Type type; |
| 16 | + /* The hierarchy of OpInfos used to make the Op */ |
8 | 17 | private final InfoChain info; |
| 18 | + /* The set of Hints used to in the initial Op call */ |
9 | 19 | private final Hints hints; |
| 20 | + /* The OpHistory used by the Op */ |
10 | 21 | private final OpHistory history; |
11 | 22 |
|
12 | | - public OpMetadata(Type type, InfoChain info, |
13 | | - Hints hints, OpHistory history) |
14 | | - { |
| 23 | + public OpMetadata(Type type, InfoChain info, Hints hints, OpHistory history) { |
15 | 24 | this.type = type; |
16 | 25 | this.history = history; |
17 | 26 | this.info = info; |
18 | 27 | this.hints = hints; |
19 | 28 | } |
20 | 29 |
|
21 | | - public OpHistory history() { |
22 | | - return history; |
| 30 | + /** |
| 31 | + * Gets the functional {@link Type} of the Op |
| 32 | + * |
| 33 | + * @return the functional {@link Type} of the Op |
| 34 | + */ |
| 35 | + public Type type() { |
| 36 | + return type; |
23 | 37 | } |
24 | 38 |
|
| 39 | + /** |
| 40 | + * Gets the hierarchy of {@link OpInfo}s used to make the Op |
| 41 | + * |
| 42 | + * @return the hierarchy of {@link OpInfo}s used to make the Op |
| 43 | + */ |
25 | 44 | public InfoChain info() { |
26 | 45 | return info; |
27 | 46 | } |
28 | 47 |
|
| 48 | + /** |
| 49 | + * Gets the {@link Hints} used in the initial matcher call |
| 50 | + * |
| 51 | + * @return the {@link Hints} used in the initial matcher call |
| 52 | + */ |
29 | 53 | public Hints hints() { |
30 | 54 | return hints; |
31 | 55 | } |
32 | 56 |
|
33 | | - public Type type() { |
34 | | - return type; |
| 57 | + /** |
| 58 | + * Gets the {@link OpHistory} used by this Op |
| 59 | + * |
| 60 | + * @return the {@link OpHistory} used by this Op |
| 61 | + */ |
| 62 | + public OpHistory history() { |
| 63 | + return history; |
35 | 64 | } |
| 65 | + |
36 | 66 | } |
0 commit comments