1 19 package org.netbeans.spi.gsf; 20 21 import org.netbeans.api.gsf.Error; 22 import org.netbeans.api.gsf.Position; 23 import org.netbeans.api.gsf.Severity; 24 import org.netbeans.api.gsf.annotations.NonNull; 25 import org.netbeans.api.gsf.annotations.Nullable; 26 import org.openide.filesystems.FileObject; 27 28 29 35 public class DefaultError implements Error { 36 private String displayName; 37 private String description; 38 39 private FileObject file; 41 private Position start; 42 private Position end; 43 private String key; 44 private Severity severity; 45 private Object [] parameters; 46 47 48 public DefaultError(@Nullable 49 String key, @NonNull 50 String displayName, @Nullable 51 String description, @NonNull 52 FileObject file, @NonNull 53 Position start, @NonNull 54 Position end, @NonNull 55 Severity severity) { 56 this.key = key; 57 this.displayName = displayName; 58 this.description = description; 59 this.file = file; 60 this.start = start; 61 this.end = end; 62 this.severity = severity; 63 } 64 65 public String getDisplayName() { 66 return displayName; 67 } 68 69 public String getDescription() { 70 return description; 71 } 72 73 84 public Position getStartPosition() { 85 return start; 86 } 87 88 public Position getEndPosition() { 89 return end; 90 } 91 92 public String toString() { 93 return "DefaultError[" + displayName + ", " + description + ", " + severity + "]"; 94 } 95 96 public String getKey() { 97 return key; 98 } 99 100 public Object [] getParameters() { 101 return parameters; 102 } 103 104 public void setParameters(final Object [] parameters) { 105 this.parameters = parameters; 106 } 107 108 public Severity getSeverity() { 109 return severity; 110 } 111 112 public FileObject getFile() { 113 return file; 114 } 115 } 116 | Popular Tags |