Skip to main content
summaryrefslogtreecommitdiffstats
blob: 9fb7a18d8b157292c87b44899121b6fbe12fb71a (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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
package org.eclipse.papyrus.alf.syntax.units;

import java.util.List;

import org.eclipse.papyrus.alf.syntax.common.DocumentedElement;

public class Member extends DocumentedElement {

	// Synthesized Properties
	public List<StereotypeAnnotation> annotation ;
	public boolean isStub = false ;
	public String name ;
	public NamespaceDefinition namespace ;
	public String visibility ;
	
	// Derived Properties
	public boolean isExternal ;
	public boolean isFeature = false ;
	public boolean isPrimitive ;
	public UnitDefinition subunit ;
	
	// Constraints
	
	/*
	 * All stereotype annotations for a member must be allowed, as determined using the stereotypeAllowed
	 * 	operation.
	 */
	public void checkMemberAnnotations() {
		
	}
	
	/*
	 * If a member is external then it must be a stub. 
	 */
	public void checkMemberExternal() {
		
	}
	
	/*
	 * A member is external if it has an @external derivation.
	 */
	public void checkMemberIsExternalDerivation() {
		
	}
	
	/*
	 * A member is primitive if it has a @primitive annotation.
	 */
	public void checkMemberIsPrimitiveDerivation() {
		
	}
	
	/*
	 * If a member is primitive, then it may not be a stub and it may not have any owned members that are
	 * 	template parameters.
	 */
	public void checkMemberPrimitive() {
		
	}
	
	/*
	 * If a member is a stub and is not external, then there must be a single subunit with the same qualified
	 * 	name as the stub that matches the stub, as determined by the matchForStub operation.
	 */
	public void checkMemberStub() {
		
	}
	
	/*
	 * If a member is a stub, then the it must not have any stereotype annotations that are the same as its
	 * 	subunit. Two stereotype annotations are the same if they are for the same stereotype.
	 */
	public void checkMemberStubStereotypes() {
		
	}
	
	/*
	 * If the member is a stub and is not external, then its corresponding subunit is a unit definition with the
	 * 	same fully qualified name as the stub.
	 */
	public void checkMemberSubunitDerivation() {
		
	}
	
	
	// Helper Operations
	
	/*
	 * Returns true of the given stereotype annotation is allowed for this kind of element.
	 */
	public boolean annotationAllowed(StereotypeAnnotation annotation) {
		return false ;
	}
	
	/*
	 * Returns true if this member is distinguishable from the given member. Two members are distinguishable
	 * 	if their names are different or the they are of different kinds (as determined by the isSameKindAs
	 * 	operation). However, in any case that the UML Superstructure considers two names to be
	 * 	distinguishable if they are different, an Alf implementation may instead impose the stronger requirement
	 * 	that the names not be conflicting.
	 */
	public boolean isDistinguishableFrom(Member member) {
		return false ;
	}
	
	/*
	 * Returns true if this member is of the same kind as the given member.
	 */
	public boolean isSameKindAs(Member member) {
		return false ;
	}
	
	/*
	 * Returns true of the given unit definition is a legal match for this member as a stub. By default, always
	 * 	returns false.
	 */
	public boolean matchForStub(UnitDefinition unit) {
		return false ;
	}
	
}

Back to the top