Interface RecordType

All Superinterfaces:
Type

@Classifier(METACLASS) @UML(identifier="RecordType", specification=ISO_19103) public interface RecordType extends Type
The type definition of a record. A RecordType defines dynamically constructed data type. It is identified by a type name and contains an arbitrary number of fields. Fields are (name, type) pairs where the type is often the wrapper for a primitive type or a String, but can also be another RecordType. Field values can be read and written but cannot be added or removed. This approach ensures that once a RecordType is constructed, it is immutable.

Comparison with features and Java reflection

If we think about RecordType as similar to a simple feature (ISO 19109) or a Java Class with public fields, then we can establish the following equivalence table:
Equivalences between records, features and Java constructs
ISO 19103 ISO 19109 Similar to Java
Record Feature Object
Record.getRecordType() Feature.getType() Object.getClass()
RecordType FeatureType Class
getTypeName() FeatureType.getName() Class.getName()
getContainer() Class.getPackage()
getFieldTypes() FeatureType.getProperties(boolean) Class.getFields()
RecordType.locate(MemberName) getProperty(String) Class.getField(String)
RecordType.isInstance(Record) Class.isInstance(Object)
RecordSchema Package
Since:
2.1
See Also: