Module: RGen::ECore::EClass::ClassModule

Defined in:
lib/rgen/ecore/ecore.rb,
lib/rgen/ecore/ecore_ext.rb

Instance Method Summary collapse

Instance Method Details

#concreteObject



67
68
69
# File 'lib/rgen/ecore/ecore_ext.rb', line 67

def concrete
  !(abstract || interface)
end

#eAllAttributes_derivedObject



165
166
167
# File 'lib/rgen/ecore/ecore.rb', line 165

def eAllAttributes_derived
  eAttributes + eSuperTypes.eAllAttributes
end

#eAllContainments_derivedObject



168
169
170
# File 'lib/rgen/ecore/ecore.rb', line 168

def eAllContainments_derived
  eReferences.select{|r| r.containment} + eSuperTypes.eAllContainments
end

#eAllReferences_derivedObject



171
172
173
# File 'lib/rgen/ecore/ecore.rb', line 171

def eAllReferences_derived
  eReferences + eSuperTypes.eAllReferences
end

#eAllStructuralFeatures_derivedObject



174
175
176
# File 'lib/rgen/ecore/ecore.rb', line 174

def eAllStructuralFeatures_derived
  eStructuralFeatures + eSuperTypes.eAllStructuralFeatures
end

#eAllSubTypesObject



63
64
65
# File 'lib/rgen/ecore/ecore_ext.rb', line 63

def eAllSubTypes
  eSubTypes + eSubTypes.eAllSubTypes
end

#eAllSuperTypes_derivedObject



177
178
179
# File 'lib/rgen/ecore/ecore.rb', line 177

def eAllSuperTypes_derived
  eSuperTypes + eSuperTypes.eAllSuperTypes
end

#eAttributes_derivedObject



180
181
182
# File 'lib/rgen/ecore/ecore.rb', line 180

def eAttributes_derived
  eStructuralFeatures.select{|f| f.is_a?(EAttribute)}
end

#eReferences_derivedObject



183
184
185
# File 'lib/rgen/ecore/ecore.rb', line 183

def eReferences_derived
  eStructuralFeatures.select{|f| f.is_a?(EReference)}
end

#isAssignableFrom(cls) ⇒ Object



71
72
73
# File 'lib/rgen/ecore/ecore_ext.rb', line 71

def isAssignableFrom(cls)
  cls == self || cls.eAllSuperTypes.any? { |super_type| super_type == self }
end

#qualifiedNameObject



55
56
57
58
59
60
61
# File 'lib/rgen/ecore/ecore_ext.rb', line 55

def qualifiedName
	if ePackage
		ePackage.qualifiedName+"::"+name
	else
		name
	end
end