1 package org.simantics.modeling;
6 import org.simantics.scl.compiler.errors.CompilationError;
8 public class ComponentTypeScriptResult {
10 private List<CompilationError> errors;
13 private Set<String> moduleReads;
14 private Set<String> moduleWrites;
16 public ComponentTypeScriptResult(List<CompilationError> errors, Object value) {
17 this(errors, value, null, null);
20 public ComponentTypeScriptResult(List<CompilationError> errors, Object value, Set<String> moduleReads, Set<String> moduleWrites) {
23 this.moduleReads = moduleReads;
24 this.moduleWrites = moduleWrites;
27 public List<CompilationError> getErrors() {
31 public Object getValue() {
35 public Set<String> getModuleReads() {
39 public Set<String> getModuleWrites() {
44 public int hashCode() {
47 result = prime * result + ((errors == null) ? 0 : errors.hashCode());
48 result = prime * result
49 + ((moduleReads == null) ? 0 : moduleReads.hashCode());
50 result = prime * result
51 + ((moduleWrites == null) ? 0 : moduleWrites.hashCode());
52 result = prime * result + ((value == null) ? 0 : value.hashCode());
57 public boolean equals(Object obj) {
62 if (getClass() != obj.getClass())
64 ComponentTypeScriptResult other = (ComponentTypeScriptResult) obj;
66 if (other.errors != null)
68 } else if (!errors.equals(other.errors))
70 if (moduleReads == null) {
71 if (other.moduleReads != null)
73 } else if (!moduleReads.equals(other.moduleReads))
75 if (moduleWrites == null) {
76 if (other.moduleWrites != null)
78 } else if (!moduleWrites.equals(other.moduleWrites))
81 if (other.value != null)
83 } else if (!value.equals(other.value))