Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/template/Template.java @ 11482:cb364a90ef62
Truffle-DSL: fixed wrong equals/hashCode in Template.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Fri, 30 Aug 2013 17:00:26 +0200 |
parents | fce94b1d46f0 |
children | bd28da642eea |
comparison
equal
deleted
inserted
replaced
11481:a317acdd5f2c | 11482:cb364a90ef62 |
---|---|
47 public Element getMessageElement() { | 47 public Element getMessageElement() { |
48 return templateType; | 48 return templateType; |
49 } | 49 } |
50 | 50 |
51 @Override | 51 @Override |
52 public boolean equals(Object obj) { | |
53 if (obj instanceof Template) { | |
54 return Utils.typeEquals(getTemplateType().asType(), ((Template) obj).getTemplateType().asType()); | |
55 } | |
56 return false; | |
57 } | |
58 | |
59 @Override | |
60 public int hashCode() { | |
61 return templateType.hashCode(); | |
62 } | |
63 | |
64 @Override | |
65 protected List<MessageContainer> findChildContainers() { | 52 protected List<MessageContainer> findChildContainers() { |
66 return Collections.emptyList(); | 53 return Collections.emptyList(); |
67 } | 54 } |
68 | 55 |
69 public String getTemplateMethodName() { | 56 public String getTemplateMethodName() { |