EclipseJDT ASTViewer Source Viewer

Home|eclipse_jdt_astviewer/src/org/eclipse/jdt/astview/views/Error.java
1/*******************************************************************************
2 * Copyright (c) 2000, 2007 IBM Corporation and others.
3 *
4 * This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License 2.0
6 * which accompanies this distribution, and is available at
7 * https://www.eclipse.org/legal/epl-2.0/
8 *
9 * SPDX-License-Identifier: EPL-2.0
10 *
11 * Contributors:
12 *     IBM Corporation - initial API and implementation
13 *******************************************************************************/
14
15package org.eclipse.jdt.astview.views;
16
17import java.util.Objects;
18
19import org.eclipse.swt.graphics.Image;
20
21
22public class Error extends ExceptionAttribute {
23
24    private final Object fParent;
25    private final String fLabel;
26
27    public Error(Object parentString labelThrowable thrownException) {
28        fParentparent;
29        fLabellabel;
30        fExceptionthrownException;
31    }
32
33    @Override
34    public Object[] getChildren() {
35        return EMPTY;
36    }
37
38    @Override
39    public Image getImage() {
40        return null;
41    }
42
43    @Override
44    public String getLabel() {
45        return fLabel;
46    }
47
48    @Override
49    public Object getParent() {
50        return fParent;
51    }
52
53    /*
54     * @see java.lang.Object#equals(java.lang.Object)
55     */
56    @Override
57    public boolean equals(Object obj) {
58        if (this == obj)
59            return true;
60        if (obj == null || !obj.getClass().equals(getClass())) {
61            return false;
62        }
63
64        Error other= (Errorobj;
65        if (!Objects.equals(fParentother.fParent)) {
66            return false;
67        }
68
69        if (!Objects.equals(fLabelother.fLabel)) {
70            return false;
71        }
72
73        return true;
74    }
75
76    /*
77     * @see java.lang.Object#hashCode()
78     */
79    @Override
80    public int hashCode() {
81        return (fParent != null ? fParent.hashCode() : 0)
82                + (fLabel != null ? fLabel.hashCode() : 0);
83    }
84
85}
86
MembersX
Error:fLabel
Error:fParent
Error:equals
Error:equals:Block:other
Error:getImage
Error:hashCode
Error:getChildren
Error:Error
Error:getLabel
Error:getParent
Members
X