attributeTypes
Syntax
attributeTypes(obj)
Details
Gets all attributes and corresponding types of the class instance.
Arguments
obj is a class instance.
Returns
A table with the following columns:
- attr: The attribute name.
- type: The data type of the attribute.
Examples
class Person {
name :: STRING
age :: INT
def Person(name_, age_) {
name = name_
age = age_
}
}
p1 = Person("Sam", 12)
attributeTypes(p1)
| attr | type |
|---|---|
| name | STRING |
| age | INT |
Related functions: attributeNames, attributeValues
