XCSG:Classifier

From AtlasWiki
Jump to: navigation, search

A Classifier is a Type which may have Fields and/or Methods, such as a class, interface, or struct. They serve as templates for runtime instances, and may extend other classifiers.

Because languages differ in the semantics of specific subtypes of classifiers, XCSG provides the language-specific subtypes, but does not attempt to provide generic subtypes of Classifier; instead, the role of a classifier can be distinguished by its features: if it has only abstract methods, its role is likely that of an interface, if it has only concrete methods, then it is likely a class, if it is actually constructed and used, that can usually be seen from inspecting data flow (exceptions may include construction by injection frameworks or construction by means of reflection).

Specification

Metaclass Classifier
Extends TypeNamespace
Description A model element that defines a set of structural and behavioral features, e.g. an Interface or Class.
Direct Subkinds Java:Annotation, Java:Class, Java:Interface, C:Struct
All Superkinds Namespace, Type, Node, ModelElement
Specified In Edges
In Edge Predecessor Multiplicity Description
InvokedType DynamicCallSite Connects a DynamicCallSite or Invoke node to the declared type of the object whose Method is being invoked.
Invoke
Supertype Classifier Connects a Classifier to another Classifier that it extends.

Inherited From In Edge Predecessor Multiplicity Description
Type AliasedType TypeAlias Connects a TypeAlias to the Type or TypeAlias it was declared to duplicate.

ArrayElementType ArrayType 0..1 Connects an ArrayType to the Type of elements contained by arrays of that type.
C:CompletedBy OpaqueType 1 Connects an OpaqueType to the complete definition of the corresponding Type.
ReferencedType Pointer Connects a Pointer to the Type of the data pointed to.
Returns Function Connects a Function to the Type of its return value (which may be Void).
TypeOf Variable Links a Variable or DataFlow node to its Type

DataFlow (Node)
Specified Out Edges
Out Edge Successor Multiplicity Description
HasVariable ProgramVariable Links a Classifier or Package to one of its Variables.
InstanceVariable
Supertype Classifier Connects a Classifier to another Classifier that it extends.

Inherited From Out Edge Successor Multiplicity Description
Type TypeChecked InstanceOf Connects a Type (usually a Classifier) to an InstanceOf test.
Known Possible In Edges

Inherited From In Edge Predecessor Multiplicity Description
Node Contains Node 1 Indicates that the predecessor contains the successor in a sense specified by the specific type of Contains edge.
Known Possible Out Edges

Inherited From Out Edge Successor Multiplicity Description
Namespace HasVariable Variable Links a Classifier or Package to one of its Variables.
Node Contains Node Indicates that the predecessor contains the successor in a sense specified by the specific type of Contains edge.