Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
blob: d850078012c8518d2315dab9e385e4a1916f168e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*
 * Created on May 1, 2003
 *
 * To change the template for this generated file go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */
package org.eclipse.jst.j2ee.archive.testutilities;

import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EStructuralFeature;

/**
 * @author administrator
 *
 * To change the template for this generated type comment go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */
public class EAttributeDescriptor {
	
	EStructuralFeature feature;
	EClass metaClass;
	
	/**
	 * 
	 */
	public EAttributeDescriptor(EStructuralFeature feature, EClass metaClass) {
		this.feature = feature;
		this.metaClass = metaClass;
	}

	/**
	 * @return
	 */
	public EClass getMetaClass() {
		return metaClass;
	}

	/**
	 * @param class1
	 */
	public void setMetaClass(EClass class1) {
		metaClass = class1;
	}
	
	public boolean equals(Object object) {
		EAttributeDescriptor o = (EAttributeDescriptor)object;
		return o.getFeature() == getFeature() && o.getMetaClass() == getMetaClass();
	}

	public int hashCode() {
		return feature.hashCode() ^ metaClass.hashCode();
	}


	/**
	 * @return
	 */
	public EStructuralFeature getFeature() {
		return feature;
	}

	/**
	 * @param attribute
	 */
	public void setFeature(EAttribute attribute) {
		this.feature = attribute;
	}

}

Back to the top